Use HashMap.computIfAbsent() in getNode() 70/87870/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 18 Feb 2020 18:14:57 +0000 (19:14 +0100)
committerRobert Varga <nite@hq.sk>
Sat, 22 Feb 2020 19:46:05 +0000 (19:46 +0000)
commit54493897a40acdff60c5be6ae833e549bded9372
tree9c2b63d60a92a23f97b778975adf34ea8b917a4a
parent269a9025fc7f5851883bcd69238a4d2923180f96
Use HashMap.computIfAbsent() in getNode()

There is no point in performing a lookup + store -- just perform
a conditional load, which saves a bucket lookup in the not-present
case.

Change-Id: Idacb1eba11da59fbb3c9554fa0d2f5fac92717d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/topology-provider/src/main/java/org/opendaylight/bgpcep/bgp/topology/provider/LinkstateTopologyBuilder.java