Fix checkstyle if-statements must use braces HostTrackerNorthbound 18/13518/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 23:01:12 +0000 (18:01 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 23:01:12 +0000 (18:01 -0500)
Change-Id: Iaf3b56c7d66bd1609599e05833788c80bddf8924
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/adsal/northbound/hosttracker/src/main/java/org/opendaylight/controller/hosttracker/northbound/HostTrackerNorthbound.java

index d7579c82e10bdd378dd603bfee9c4fde1d0ad414..3769cc7818e8e2268dc0f1a11f07cad8f5103ff8 100644 (file)
@@ -83,7 +83,9 @@ public class HostTrackerNorthbound {
 
     @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() {