From 5757d9a12eb174c85cf85c8a7671f685d6b482a1 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Tue, 9 Dec 2014 19:16:11 -0500 Subject: [PATCH] Fix checkstyle if-statements must use braces hosttracker Change-Id: I4ecd87422d228da396bfd3027aae3a365206fe2a Signed-off-by: Thanh Ha --- .../controller/hosttracker/IPHostId.java | 15 ++++++++----- .../controller/hosttracker/IPMacHostId.java | 21 ++++++++++++------- 2 files changed, 24 insertions(+), 12 deletions(-) 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; } -- 2.36.6