Various small fixes
Change-Id: I83802169d0d968f7b88d4be2cedba74b15fdd7da
diff --git a/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java b/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java
index d05acc3..3ebb982 100644
--- a/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java
+++ b/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java
@@ -67,7 +67,7 @@
public NetconfDeviceInfo(String name, String password, IpAddress ipAddress,
int port) {
checkArgument(!name.equals(""), "Empty device username");
- checkNotNull(port > 0, "Negative port");
+ checkArgument(port > 0, "Negative port");
checkNotNull(ipAddress, "Null ip address");
this.name = name;
this.password = password;
@@ -96,7 +96,7 @@
public NetconfDeviceInfo(String name, String password, IpAddress ipAddress,
int port, String keyString) {
checkArgument(!name.equals(""), "Empty device name");
- checkNotNull(port > 0, "Negative port");
+ checkArgument(port > 0, "Negative port");
checkNotNull(ipAddress, "Null ip address");
this.name = name;
this.password = password;
@@ -116,7 +116,7 @@
*/
public NetconfDeviceInfo(NetconfDeviceConfig netconfConfig) {
checkArgument(!netconfConfig.username().isEmpty(), "Empty device name");
- checkNotNull(netconfConfig.port() > 0, "Negative port");
+ checkArgument(netconfConfig.port() > 0, "Negative port");
checkNotNull(netconfConfig.ip(), "Null ip address");
this.name = netconfConfig.username();