Improve AbstractPathArgument.hashCodeImpl() 46/82346/7
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 30 May 2019 22:23:04 +0000 (00:23 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 15 Jan 2020 11:09:01 +0000 (11:09 +0000)
commite8047fca66a9b6c1ffa3c63c3478d2648e05b461
tree3be0c7c5e840b16aef82f85442995667bac877fb
parente6f0f9f2bf0f104b08c09fea340b95f0f0591a25
Improve AbstractPathArgument.hashCodeImpl()

Current computation of hashCode() introduces needless computation,
just for the sake of the computation.

This patch changes the hashCode() algorithm and removes increment:

    QName.hashCode() + 31

which has no real value to how hashCodeImpl() operates. While
we're in the area, we propagate useless invariants.

Change-Id: Ib18518013774673603268ad747883d67b5d2bbf3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java