From: Thanh Ha Date: Wed, 10 Dec 2014 00:16:11 +0000 (-0500) Subject: Fix checkstyle if-statements must use braces hosttracker X-Git-Tag: release/lithium~778^2~1 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=5757d9a12eb174c85cf85c8a7671f685d6b482a1 Fix checkstyle if-statements must use braces hosttracker Change-Id: I4ecd87422d228da396bfd3027aae3a365206fe2a Signed-off-by: Thanh Ha --- diff --git a/opendaylight/adsal/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IPHostId.java b/opendaylight/adsal/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IPHostId.java index b8b54b45ba..a6314e0695 100644 --- a/opendaylight/adsal/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IPHostId.java +++ b/opendaylight/adsal/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IPHostId.java @@ -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; } diff --git a/opendaylight/adsal/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IPMacHostId.java b/opendaylight/adsal/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IPMacHostId.java index e10c5d1a78..19f3f585b1 100644 --- a/opendaylight/adsal/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IPMacHostId.java +++ b/opendaylight/adsal/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IPMacHostId.java @@ -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; }