Merge "Do not return null when no RPC is registered"
[yangtools.git] / yang / yang-binding / src / main / java / org / opendaylight / yangtools / yang / binding / InstanceIdentifier.java
index 16a06e139f70c89c4daa361b9e0a5c47af3cd5b8..09f0dc13c35cfcbe40f5729f67d06ffc71d352ea 100644 (file)
@@ -15,6 +15,7 @@ import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.concepts.Path;
 
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Iterables;
 
 /**
@@ -34,7 +35,7 @@ public final class InstanceIdentifier<T extends DataObject> implements Path<Inst
     }
 
     public InstanceIdentifier(List<PathArgument> path, Class<T> type) {
-        this.path = Collections.<PathArgument> unmodifiableList(new ArrayList<>(path));
+        this.path = ImmutableList.copyOf(path);
         this.targetType = type;
     }