Fix checkstyle if-statements must use braces adsal/northbound/staticrouting 16/13516/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:58:29 +0000 (17:58 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:58:29 +0000 (17:58 -0500)
Change-Id: I1a12ee8523e948af752c5fb2627a8567c99ed9e5
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/adsal/northbound/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/northbound/StaticRoutingNorthbound.java

index 20f6cb4..de291d6 100644 (file)
@@ -88,7 +88,9 @@ public class StaticRoutingNorthbound {
 
     @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() {
         return username;