Merge "Add curly braces to if/else statements. (sonar)"
authorAlessandro Boch <aboch@cisco.com>
Wed, 11 Sep 2013 01:30:59 +0000 (01:30 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 11 Sep 2013 01:30:59 +0000 (01:30 +0000)
1  2 
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/internal/ConnectionManager.java

@@@ -352,18 -352,23 +352,23 @@@ public class ConnectionManager implemen
          String controller = ci.nextArgument();
          if (controller == null) {
              ci.println("Nodes connected to this controller : ");
-             if (this.getLocalNodes() == null) ci.println("None");
-             else ci.println(this.getLocalNodes().toString());
+             if (this.getLocalNodes() == null) {
+                 ci.println("None");
+             } else {
+                 ci.println(this.getLocalNodes().toString());
+             }
              return;
          }
          try {
              InetAddress address = InetAddress.getByName(controller);
              ci.println("Nodes connected to controller "+controller);
-             if (this.getNodes(address) == null) ci.println("None");
-             else ci.println(this.getNodes(address).toString());
-             return;
+             if (this.getNodes(address) == null) {
+                 ci.println("None");
+             } else {
+                 ci.println(this.getNodes(address).toString());
+             }
          } catch (UnknownHostException e) {
 -            e.printStackTrace();
 +           logger.error("An error occured",e);
          }
      }