BUG-650: speedup getSubtransaction() 01/11101/1
authorRobert Varga <rovarga@cisco.com>
Fri, 12 Sep 2014 11:20:37 +0000 (13:20 +0200)
committerRobert Varga <rovarga@cisco.com>
Fri, 12 Sep 2014 12:56:05 +0000 (14:56 +0200)
commit97372803bc14ef983106b2de52dae79e7754a4ab
treedb90f7d8e7255b725c5f72b035f36f3915e598e1
parent23a3dea5804c8198e61f550736911b5c992d6b6d
BUG-650: speedup getSubtransaction()

getSubtransaction() is on fast path and it performs two map lookups:
first with containsKey() and then with get(). We know the map cannot
contain null values, so we can perform only the get() and then make
a precondition check on the returned value being non-null.

Change-Id: I477969c8512e3c22e5b7ae5455e0281613a9c752
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/AbstractDOMForwardedCompositeTransaction.java