(Multi)NamingContext: increment after computing max 32/9832/1
authorMarek Gradzki <[email protected]>
Wed, 13 Dec 2017 16:15:53 +0000 (17:15 +0100)
committerMarek Gradzki <[email protected]>
Wed, 13 Dec 2017 16:45:52 +0000 (16:45 +0000)
commit594d4f62ec8684e61314bce6e042cf3910e77e4e
tree6ec4818d67341d94a869843e58d27a68383a2e6d
parent8931ab48b5ff8684aa56372c883ff660f13ec719
(Multi)NamingContext: increment after computing max

Instead of incrementing all elements of stream
and applying max, first compute max and then increment.

Change-Id: I4e45ffa74d9b8685abd7bafaddc77d1d9850abdb
Signed-off-by: Marek Gradzki <[email protected]>
(cherry picked from commit 4840c9fc6ab956d6210ac33d8e9c5b1abbc4172e)
vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java
vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/NamingContext.java
vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/NamingContextTest.java