Add curly braces to if/else statements. (sonar)
[controller.git] / opendaylight / hosttracker_new / api / src / main / java / org / opendaylight / controller / hosttracker / Entity.java
index 924d0717e966aa4731aa340e67a54efe18cbf991..64f4c7ef1e1d65bddcafd7310dccfe6b44278741 100644 (file)
@@ -244,10 +244,12 @@ public class Entity implements Comparable<Entity> {
     @Override
     public int compareTo(Entity o) {
         int r;
-        if (port == null)
+        if (port == null) {
             r = o.port == null ? 0 : -1;
-        else if (o.port == null)
+        }
+        else if (o.port == null) {
             r = 1;
+        }
         else {
             // XXX - the node id is only defined as an object rather
             // than something useful. We're just going to have to