Test composite node with empty conts and lists to Json
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / test / structures / Cont.java
index a1028ca0327ab58773f91c5c8de0c1b279f1ba60..00783537d8aff029b55ac1c0d9e6f25ec1f941b6 100644 (file)
@@ -24,7 +24,11 @@ public class Cont extends LstItem {
             return false;
         }
         Cont cont = (Cont) obj;
-        if (!this.name.equals(cont.name)) {
+        if (this.name == null) {
+            if (cont.name != null) {
+                return false;
+            }
+        } else if (!this.name.equals(cont.name)) {
             return false;
         }
         return true;