Serialization/Deserialization and a host of other fixes
[controller.git] / opendaylight / md-sal / sal-protocolbuffer-encoding / src / main / java / org / opendaylight / controller / cluster / datastore / node / utils / NodeIdentifierWithPredicatesGenerator.java
index 40b5c2e813c82007b5d3e5112a01055fa638ab33..4bfcf391dd7afc3f635732022217a18ec8509884 100644 (file)
@@ -19,15 +19,16 @@ public class NodeIdentifierWithPredicatesGenerator{
     private final boolean doesMatch;
     private final ListSchemaNode listSchemaNode;
 
-    public NodeIdentifierWithPredicatesGenerator(String id){
-        this(id, null);
-    }
-
-    public NodeIdentifierWithPredicatesGenerator(String id, ListSchemaNode schemaNode){
+    public NodeIdentifierWithPredicatesGenerator(String id, DataSchemaNode schemaNode){
         this.id = id;
         matcher = pattern.matcher(this.id);
         doesMatch = matcher.matches();
-        this.listSchemaNode = schemaNode;
+
+        if(schemaNode instanceof  ListSchemaNode){
+            this.listSchemaNode = (ListSchemaNode) schemaNode;
+        } else {
+            this.listSchemaNode = null;
+        }
     }