Fix checkstyle if-statements must use braces sal-common-util 05/13505/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:41:24 +0000 (17:41 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:41:24 +0000 (17:41 -0500)
Change-Id: I518b9fa156af55c080d7e6a55067deab2c789a42
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Arguments.java

index a4017c2..17ce5df 100644 (file)
@@ -23,8 +23,9 @@ public final class Arguments {
      */
     @SuppressWarnings("unchecked")
     public static <T> T checkInstanceOf(Object value, Class<T> type) {
-        if(!type.isInstance(value))
+        if(!type.isInstance(value)) {
             throw new IllegalArgumentException(String.format("Value %s is not of type %s", value, type));
+        }
         return (T) value;
     }
 }