Fix Major Sonar Issues: SouthboundEvent.java. 33/13033/1
authorMarcus Koontz <marcus.g.koontz@intel.com>
Fri, 21 Nov 2014 01:29:57 +0000 (17:29 -0800)
committerMarcus Koontz <marcus.g.koontz@intel.com>
Fri, 21 Nov 2014 01:29:57 +0000 (17:29 -0800)
Fixes the following issues:
- Removed semi-colon to fix empty statement error
- 12 Avoid using If/If else/For statements without curly braces

https://sonar.opendaylight.org/component#component=org.opendaylight.ovsdb:openstack.net-virt:master:src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundEvent.java

Change-Id: Ic3adee50ec4a3f6f0d48c3d8330cfde9654d423f
Signed-off-by: Marcus Koontz <marcus.g.koontz@intel.com>
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundEvent.java

index 1b8001a1227c9e387e0780331b255e3402d1afd7..b2c47e14d4e6f81b2014f9629784e8c1cb31005d 100644 (file)
@@ -14,7 +14,7 @@ import org.opendaylight.ovsdb.lib.notation.Row;
 import org.opendaylight.ovsdb.openstack.netvirt.api.Action;
 
 public class SouthboundEvent extends AbstractEvent {
-    public enum Type { NODE, ROW };
+    public enum Type { NODE, ROW }
     private Type type;
     private Node node;
     private String tableName;
@@ -78,35 +78,47 @@ public class SouthboundEvent extends AbstractEvent {
     }
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
-        if (!super.equals(obj))
+        }
+        if (!super.equals(obj)) {
             return false;
+        }
         SouthboundEvent other = (SouthboundEvent) obj;
         if (node == null) {
-            if (other.node != null)
+            if (other.node != null) {
                 return false;
-        } else if (!node.equals(other.node))
+            }
+        } else if (!node.equals(other.node)) {
             return false;
+        }
         if (tableName == null) {
-            if (other.tableName != null)
+            if (other.tableName != null) {
                 return false;
-        } else if (!tableName.equals(other.tableName))
+            }
+        } else if (!tableName.equals(other.tableName)) {
             return false;
+        }
         if (type == null) {
-            if (other.type != null)
+            if (other.type != null) {
                 return false;
-        } else if (!type.equals(other.type))
+            }
+        } else if (!type.equals(other.type)) {
             return false;
+        }
         if (uuid == null) {
-            if (other.uuid != null)
+            if (other.uuid != null) {
                 return false;
-        } else if (!uuid.equals(other.uuid))
+            }
+        } else if (!uuid.equals(other.uuid)) {
             return false;
+        }
         return true;
     }
 }