BUG-7464: Fix original porting damage in conditional operations 91/49891/11
authorRobert Varga <rovarga@cisco.com>
Sat, 31 Dec 2016 16:30:53 +0000 (17:30 +0100)
committerRobert Varga <nite@hq.sk>
Tue, 10 Jan 2017 19:02:43 +0000 (19:02 +0000)
commit62f6b314ee1c5ae6fd49d9133eed2105886e560c
treea92bde4054a8f73d30375f54e4477dbddea828ab
parenta022500bed967d2726e9daf5b9bece77f88488f8
BUG-7464: Fix original porting damage in conditional operations

Scala version of INode returns a correct empty Option
in case an LNode does not contain the expected key, whereas
this implementation happily falls through to a RuntimeException,
this this porting damage, adding an appropriate comment.

Removal of values through Map.remove(Object, Object) was
inconsistent in that the SNode case uses v.equals() whereas
the LNode case uses identity check. This is inconsistent
and runs contrary to the interface specitication, which calls
for using Objects.equals() -- which boils down to v.equals()
just as the SNode case does.

Change-Id: I33dd986e59211aa4c0be3648ae35e2818ebce8ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
third-party/triemap/src/main/java/org/opendaylight/yangtools/triemap/INode.java
third-party/triemap/src/test/java/org/opendaylight/yangtools/triemap/TestConcurrentMapPutIfAbsent.java
third-party/triemap/src/test/java/org/opendaylight/yangtools/triemap/TestConcurrentMapRemove.java
third-party/triemap/src/test/java/org/opendaylight/yangtools/triemap/TestConcurrentMapReplace.java
third-party/triemap/src/test/java/org/opendaylight/yangtools/triemap/TestDelete.java
third-party/triemap/src/test/java/org/opendaylight/yangtools/triemap/ZeroHashInt.java [new file with mode: 0644]