Add curly braces to if statements in StaticRouteConfig 83/1483/2
authorAlissa Bonas <abonas@redhat.com>
Sun, 29 Sep 2013 13:44:10 +0000 (16:44 +0300)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 30 Sep 2013 11:08:14 +0000 (11:08 +0000)
Change-Id: I85ddb4b0e0a2a3b604b4eb6c5c526990127b2f4e
Signed-off-by: Alissa Bonas <abonas@redhat.com>
opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/StaticRouteConfig.java

index ceacebffb05cb57a8dfcc8fdf8ea8addc032e168..a4505c8b1c8e6a732127de0aebbb4746874aacee 100644 (file)
@@ -103,8 +103,9 @@ public class StaticRouteConfig implements Serializable {
      * @return The string representation of the next hop address type
      */
     public String getNextHopType() {
-        if (nextHopType == null)
+        if (nextHopType == null) {
             return StaticRoute.NextHopType.IPADDRESS.toString();
+        }
         return nextHopType;
     }
 
@@ -218,8 +219,9 @@ public class StaticRouteConfig implements Serializable {
      * @return The IP address
      */
     public InetAddress getStaticRouteIP() {
-        if (!isValidStaticRouteEntry())
+        if (!isValidStaticRouteEntry()) {
             return null;
+        }
         InetAddress ip = null;
         try {
             ip = InetAddress.getByName(staticRoute.split("/")[0]);
@@ -337,12 +339,15 @@ public class StaticRouteConfig implements 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;
+        }
         StaticRouteConfig other = (StaticRouteConfig) obj;
         if (name == null) {
             if (other.name != null)