Refactor IpAddressUtil.bytesFor() 31/111731/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 19 May 2024 16:43:40 +0000 (18:43 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 19 May 2024 16:45:07 +0000 (18:45 +0200)
commit4be84722010d8a1f11608db26cda358bcf0f4dfa
tree549fa162c2a38bad4d0a70f0b3d65a2e594fa345
parent5d7c4886568fbafe4e1ad28ee223412c6705983c
Refactor IpAddressUtil.bytesFor()

The case where both components are null is impossible, hence we can
eliminate assertions. That also means all users are immediately copying
the buffer into another buffer -- hence we name the new method
writeBytesFor().

Change-Id: I7595e40b4b486ec6a65d69a6059beed93b6d5e8c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/concepts/src/main/java/org/opendaylight/bgp/concepts/IpAddressUtil.java
bgp/extensions/evpn/src/main/java/org/opendaylight/protocol/bgp/evpn/impl/nlri/EthSegRParser.java
bgp/extensions/evpn/src/main/java/org/opendaylight/protocol/bgp/evpn/impl/nlri/IncMultEthTagRParser.java
bgp/extensions/mvpn/src/main/java/org/opendaylight/protocol/bgp/mvpn/impl/nlri/AbstractMvpnNlri.java
bgp/extensions/mvpn/src/main/java/org/opendaylight/protocol/bgp/mvpn/impl/nlri/CMulticastUtil.java
bgp/extensions/mvpn/src/main/java/org/opendaylight/protocol/bgp/mvpn/impl/nlri/MulticastGroupOpaqueUtil.java
bgp/extensions/mvpn/src/main/java/org/opendaylight/protocol/bgp/mvpn/impl/nlri/SourceActiveADHandler.java