Fix checkstyle if-statements must use braces sal-rest-docgen 02/13502/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:32:21 +0000 (17:32 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:32:21 +0000 (17:32 -0500)
Change-Id: Id08ad375b27838637497dd507df0c076bf2b63df
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/md-sal/sal-rest-docgen/src/main/java/org/opendaylight/controller/sal/rest/doc/DocProvider.java

index 9442ca0c073b0e6026db7b783cd8f85b2dc36585..c07e9c78be7a24672cbca9a5c75c3ea01cb07d34 100644 (file)
@@ -76,11 +76,13 @@ public class DocProvider implements BundleActivator, ServiceTrackerCustomizer<Br
 
     @Override
     public void stop(BundleContext context) throws Exception {
-        if (brokerServiceTracker != null)
+        if (brokerServiceTracker != null) {
             brokerServiceTracker.close();
+        }
 
-        if (session != null)
+        if (session != null) {
             session.close();
+        }
 
         synchronized (toClose) {
             for (AutoCloseable close : toClose) {
@@ -98,8 +100,9 @@ public class DocProvider implements BundleActivator, ServiceTrackerCustomizer<Br
 
     @Override
     public void modifiedService(ServiceReference<Broker> reference, Broker service) {
-        if (session != null)
+        if (session != null) {
             session.close();
+        }
 
         Broker broker = bundleContext.getService(reference);
         session = broker.registerProvider(this, bundleContext);