Fix checkstyle if-statements must use braces sal-common-impl 06/13506/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:42:25 +0000 (17:42 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:42:25 +0000 (17:42 -0500)
Change-Id: Ib2d0a8bcf4cef4a589a8c23181433dd14ea84657
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/AbstractDataModification.java
opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/routing/RoutingUtils.java

index 8950b3c..1d3967f 100644 (file)
@@ -104,8 +104,9 @@ public abstract class AbstractDataModification<P extends Path<P>, D> implements
     }
 
     private final void checkMutable() {
-        if (!NEW.equals(this.getStatus()))
+        if (!NEW.equals(this.getStatus())) {
             throw new IllegalStateException("Transaction was already submitted");
+        }
     }
 
     @Override
index 9001aaa..0672ba2 100644 (file)
@@ -80,16 +80,19 @@ public class RoutingUtils {
             }
             RouteChangeImpl<?, ?> other = (RouteChangeImpl<?, ?>) obj;
             if (announcement == null) {
-                if (other.announcement != null)
+                if (other.announcement != null) {
                     return false;
-            } else if (!announcement.equals(other.announcement))
+                }
+            } else if (!announcement.equals(other.announcement)) {
                 return false;
+            }
             if (removal == null) {
                 if (other.removal != null) {
                     return false;
                 }
-            } else if (!removal.equals(other.removal))
+            } else if (!removal.equals(other.removal)) {
                 return false;
+            }
             return true;
         }
     }