Fix checkstyle if-statements must use braces adsal/northbound/statistics 15/13515/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:57:09 +0000 (17:57 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:57:09 +0000 (17:57 -0500)
Change-Id: I2ef8d4fc3977eb8db6e369d9bb2fb2c6b5ad70db
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/adsal/northbound/statistics/src/main/java/org/opendaylight/controller/statistics/northbound/StatisticsNorthbound.java

index 4175f1e3c49984c7d90ac03b2207df946c9f7e3a..ad9d1269e50d26dde72dd579d4eaa51d00447d4b 100644 (file)
@@ -70,7 +70,9 @@ public class StatisticsNorthbound {
     }
     @Context
     public void setSecurityContext(SecurityContext context) {
-        if (context != null && context.getUserPrincipal() != null) username = context.getUserPrincipal().getName();
+        if (context != null && context.getUserPrincipal() != null) {
+            username = context.getUserPrincipal().getName();
+        }
     }
 
     protected String getUserName() {