Eliminate KeyedListNodeCodecContext.Unordered.getKey() 87/89587/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 4 May 2020 12:40:40 +0000 (14:40 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 4 May 2020 13:12:10 +0000 (15:12 +0200)
commit5b67ca39a136aa27e34adf1d8933a717c1dd6a75
tree740be4aa159cf32833a8f90b4841b6e8b2d8d717
parent810b21789fe259e454dff5ba908190347039fd2a
Eliminate KeyedListNodeCodecContext.Unordered.getKey()

This method and the methodhandle invoker are completely superfluous,
as we can directly access key() from the created object. While capturing
a MethodHandle lowers what method can be invoked, it does not really
buy us much, as the observed class will we always the same.

That property is visible enough (wired through an invokeExact() on the
constructor), hence JIT should be able to optimize without this help.

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