Improve RouteDistinguisherUtil 36/105636/2
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 23 Apr 2023 21:23:06 +0000 (23:23 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 23 Apr 2023 22:49:20 +0000 (00:49 +0200)
commitb69833ceab7a982b95af88195376cb6307041c48
tree269411c3b22712056a0d3ea540ad827ebe27e9b9
parent6dd8475ab61348f0e4140abc43c6ad5b70da9d61
Improve RouteDistinguisherUtil

Do not muck with NormalizedNodes.findNode(), as we have the same
functionlity directly available.

Eliminate RDType -- it is a noble idea, but all we really need is just
valid constants. This improves both paths, as the arguments are now
known compile-time constants.

Finally improve nullness annotations, eliminating the need for a
requireNonNull() in flowspec.

Change-Id: I176db96b783649de166797ee84bf919e68a57196
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 9a33d43e3516ad73e0ec74df82034f9fe23a5c28)
bgp/concepts/src/main/java/org/opendaylight/bgp/concepts/RouteDistinguisherUtil.java
bgp/extensions/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/AbstractFlowspecL3vpnNlriParser.java