Index cached data by method name 76/77876/3
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 16 Nov 2018 07:15:42 +0000 (08:15 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 16 Nov 2018 10:58:51 +0000 (11:58 +0100)
commiteed478044b1ec55aa58f973fd1214e084129a610
treed446a28f65373adb12b5f1136e7bc2cc2a020906
parent06f44043bc679e39f54d05394e01a60198086959
Index cached data by method name

Method.hashCode() is not a constant, whereas String.hashCode() is
pre-computed (for interned Strings). As Method.getName() is guaranteed
to be interned and getters have zero arguments, a method's name
is enough to uniquely identify the corresponding piece of data.

Therefore use Method.getName() to index cachedData.

Change-Id: Ie9fec477bd7346042e3700695588bc526fd56dac
JIRA: MDSAL-398
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/LazyDataObject.java