Fix checkstyle if-statements must use braces adsal/samples/loadbalancer 12/13512/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:53:03 +0000 (17:53 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:53:03 +0000 (17:53 -0500)
Change-Id: I57535ed22a2ad4947dfb768b399c69d15444b39e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/adsal/samples/loadbalancer/src/main/java/org/opendaylight/controller/samples/loadbalancer/ConfigManager.java
opendaylight/adsal/samples/loadbalancer/src/main/java/org/opendaylight/controller/samples/loadbalancer/internal/LoadBalancerService.java

index 77d03aa..e7b261c 100644 (file)
@@ -176,17 +176,19 @@ public class ConfigManager implements IConfigManager{
 
     @Override
     public boolean memberExists(String name, String poolName) {
-        if(this.pools.containsKey(poolName)){
-            if(this.pools.get(poolName).getMember(name) != null )
+        if (this.pools.containsKey(poolName)) {
+            if (this.pools.get(poolName).getMember(name) != null) {
                 return true;
+            }
         }
         return false;
     }
 
     @Override
-    public boolean memberExists(String name, String memberIP,String poolName){
-        if(!this.pools.containsKey(poolName))
+    public boolean memberExists(String name, String memberIP,String poolName) {
+        if (!this.pools.containsKey(poolName)) {
             return false;
+        }
 
         return this.pools.get(poolName).poolMemberExists(new PoolMember(name, memberIP, poolName));
     }
index e1a997b..b4836e9 100644 (file)
@@ -146,8 +146,9 @@ public class LoadBalancerService implements IListenDataPacket, IConfigManager {
      * requires
      */
     public String getContainerName() {
-        if (containerName == null)
+        if (containerName == null) {
             return GlobalConstants.DEFAULT.toString();
+        }
         return containerName;
     }