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 20f6cb40a56cb812fa5370a5dd01cc6bf2ef85e8..de291d6d9647c6536558c91fc246c3cab75ac3a9 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;