Index cached data by method name
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 16 Nov 2018 07:15:42 +0000 (08:15 +0100)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 19 Jun 2024 00:41:25 +0000 (10:41 +1000)
commitd7ff09e9a9dc07977ea457ec9d8fd023d9fbb01d
treea6301660c75228d47eb3da589da84d93a3efec83
parent52403551c4a7cbabdab3aae178bb81aec64441ae
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