BUG-582: do not call hashCode() from IdentifiableItem.equals()
authorRobert Varga <rovarga@cisco.com>
Fri, 6 Jun 2014 12:37:25 +0000 (14:37 +0200)
committerRobert Varga <rovarga@cisco.com>
Fri, 6 Jun 2014 12:43:37 +0000 (14:43 +0200)
commit9dce933f2d362f80c0efd293df5ed85c2001bef5
tree13e708cb4c852320fc9c9c2db566b794924a7496
parentb1d4f65a5885398b351214781ae869331d158ce6
BUG-582: do not call hashCode() from IdentifiableItem.equals()

This call would make sense if we had cached hashCode -- but we do not.
We have two options here, either cache hashCode, or not call it from
equals().

Tracing ODL identified that the only other caller of
hashCode() is HashCodeBuilder.nextHashCode() -- thus the hash code is
used only once.

So caching it would add useless overhead of 4 bytes -- so let's just say
no to that.

Change-Id: I19ae0e5025fb6aec5b4d1019b55976ca5ca2e9d4
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifier.java