X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnect%2Futil%2FRemoteDeviceId.java;h=6ccc954716788419036ed49a37a597c25234d347;hb=refs%2Fchanges%2F99%2F24099%2F5;hp=6bc84f101595c32a5fc0b028868940165d082db9;hpb=81d69b64c20a8e17279a57920beab854922c668c;p=controller.git diff --git a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/util/RemoteDeviceId.java b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/util/RemoteDeviceId.java index 6bc84f1015..6ccc954716 100644 --- a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/util/RemoteDeviceId.java +++ b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/util/RemoteDeviceId.java @@ -37,26 +37,14 @@ public final class RemoteDeviceId { private InetSocketAddress address; private Host host; - @Deprecated - public RemoteDeviceId(final ModuleIdentifier identifier) { - this(Preconditions.checkNotNull(identifier).getInstanceName()); - } - - public RemoteDeviceId(final ModuleIdentifier identifier, Host host) { - this(identifier); - this.host = host; - } - public RemoteDeviceId(final ModuleIdentifier identifier, InetSocketAddress address) { - this(identifier); + this(Preconditions.checkNotNull(identifier).getInstanceName()); this.address = address; this.host = buildHost(); } - @Deprecated - public RemoteDeviceId(final String name) { - Preconditions.checkNotNull(name); - this.name = name; + private RemoteDeviceId(final String name) { + this.name = Preconditions.checkNotNull(name); this.key = new NodeKey(new NodeId(name)); this.path = createBIPath(name); this.bindingPath = createBindingPath(key); @@ -105,9 +93,7 @@ public final class RemoteDeviceId { } private Host buildHost() { - return address.getAddress().getHostAddress() != null - ? HostBuilder.getDefaultInstance(address.getAddress().getHostAddress()) - : HostBuilder.getDefaultInstance(address.getAddress().getHostName()); + return HostBuilder.getDefaultInstance(address.getHostString()); } public String getName() {