Fix checkstyle if-statements must use braces hosttracker 23/13523/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 10 Dec 2014 00:16:11 +0000 (19:16 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 10 Dec 2014 00:16:11 +0000 (19:16 -0500)
Change-Id: I4ecd87422d228da396bfd3027aae3a365206fe2a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/adsal/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IPHostId.java
opendaylight/adsal/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IPMacHostId.java

index b8b54b45ba8d10cac4cea25e4f0139bb2ee1c5f1..a6314e06957ce17de1ea62ed0824743ae70b96ee 100644 (file)
@@ -42,18 +42,23 @@ public class IPHostId implements IHostId, Serializable {
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         IPHostId other = (IPHostId) obj;
         if (ipAddress == null) {
-            if (other.ipAddress != null)
+            if (other.ipAddress != null) {
                 return false;
-        } else if (!ipAddress.equals(other.ipAddress))
+            }
+        } else if (!ipAddress.equals(other.ipAddress)) {
             return false;
+        }
         return true;
     }
 
index e10c5d1a78310e5bc1f81393a7899ec4aefab0c2..19f3f585b197cb7a81dea5804e5e0524c77d7a5d 100644 (file)
@@ -56,23 +56,30 @@ public class IPMacHostId implements IHostId, Serializable {
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         IPMacHostId other = (IPMacHostId) obj;
         if (ipAddress == null) {
-            if (other.ipAddress != null)
+            if (other.ipAddress != null) {
                 return false;
-        } else if (!ipAddress.equals(other.ipAddress))
+            }
+        } else if (!ipAddress.equals(other.ipAddress)) {
             return false;
+        }
         if (macAddr == null) {
-            if (other.macAddr != null)
+            if (other.macAddr != null) {
                 return false;
-        } else if (!macAddr.equals(other.macAddr))
+            }
+        } else if (!macAddr.equals(other.macAddr)) {
             return false;
+        }
         return true;
     }