BUG-582: do not call hashCode() from IdentifiableItem.equals() 77/7777/1
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)
commit361efae8c4790eaa6ba846835f74df4a5069c7f8
tree660c923aed1e3b595edeacfe280c0efd1ac95c45
parent55676f5e8a825b6b7ea78b30c348242240340008
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