Remove deprecated constructors from RemoteDeviceId
[controller.git] / opendaylight / md-sal / sal-netconf-connector / src / main / java / org / opendaylight / controller / sal / connect / util / RemoteDeviceId.java
index 6bc84f101595c32a5fc0b028868940165d082db9..6ccc954716788419036ed49a37a597c25234d347 100644 (file)
@@ -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() {