From 3ab61d8c9e28ccb4bfbfe452768957057add7712 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 11 Jul 2018 20:48:42 +0200 Subject: [PATCH] Rely in ietf-inet-util to convert IpAddress to string Union-based getValue() is char[]-based for JMX, do not use it. Change-Id: I67f913e01ee06e26714eaf6554ec2623391cf1b8 Signed-off-by: Robert Varga --- .../netconf/sal/restconf/impl/RestconfProviderImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfProviderImpl.java b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfProviderImpl.java index 19d34af070..42c5d55e1d 100644 --- a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfProviderImpl.java +++ b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfProviderImpl.java @@ -20,6 +20,7 @@ import org.opendaylight.netconf.sal.restconf.impl.jmx.Put; import org.opendaylight.netconf.sal.restconf.impl.jmx.RestConnectorRuntimeMXBean; import org.opendaylight.netconf.sal.restconf.impl.jmx.Rpcs; import org.opendaylight.netconf.sal.streams.websockets.WebSocketServer; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IetfInetUtil; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber; @@ -40,7 +41,7 @@ public class RestconfProviderImpl extends AbstractMXBean public void start() { this.webSocketServerThread = new Thread(WebSocketServer.createInstance( - new String(websocketAddress.getValue()), websocketPort.getValue())); + IetfInetUtil.INSTANCE.stringForIpAddress(websocketAddress), websocketPort.getValue())); this.webSocketServerThread.setName("Web socket server on port " + websocketPort); this.webSocketServerThread.start(); -- 2.36.6