Use IetfInetUtil for IpAddressNoZone formatting 60/90260/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 7 Jun 2020 10:28:34 +0000 (12:28 +0200)
committerRobert Varga <nite@hq.sk>
Sun, 7 Jun 2020 10:33:32 +0000 (10:33 +0000)
commitfcf08fa97449733b587f30b21aa0f54f41362d1a
tree6d7f1cc7256567cf4caa450e7705ad1906ea13d1
parente62884742d074213df69731e7bc0c3eb88d79b77
Use IetfInetUtil for IpAddressNoZone formatting

Rather than going through InetAddress.getHostAddress(), use
provided utilities to instantiate IpAddressNoZone more efficiently.
Fixes the following splat:

java.lang.IllegalArgumentException: Cannot create IpAddress from 2001:db8:1000:0:0:0:0:10%0
    at org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZoneBuilder.getDefaultInstance(IpAddressNoZoneBuilder.java:26) ~[bundleFile:?]
    at org.opendaylight.bgpcep.pcep.topology.provider.AbstractTopologySessionListener.onSessionUp(AbstractTopologySessionListener.java:165) ~[bundleFile:?]
    at org.opendaylight.protocol.pcep.impl.PCEPSessionImpl.sessionUp(PCEPSessionImpl.java:377) [bundleFile:?]
    at org.opendaylight.protocol.pcep.impl.PCEPSessionImpl.handlerAdded(PCEPSessionImpl.java:425) [bundleFile:?]
    at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:971) [bundleFile:4.1.48.Final]

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