Fixing mutability for ResourceId.

Change-Id: I44583fbf3e66edc52a873e493d3af19b9c6337f8
diff --git a/model/src/main/java/org/onosproject/yang/model/ResourceId.java b/model/src/main/java/org/onosproject/yang/model/ResourceId.java
index 206939d..2ccd09a 100644
--- a/model/src/main/java/org/onosproject/yang/model/ResourceId.java
+++ b/model/src/main/java/org/onosproject/yang/model/ResourceId.java
@@ -16,6 +16,8 @@
 
 package org.onosproject.yang.model;
 
+import com.google.common.collect.ImmutableList;
+
 import java.util.LinkedList;
 import java.util.List;
 
@@ -30,12 +32,12 @@
  * hierarchy to reach a resource in the instance tree.
  */
 
-public class ResourceId {
+public final class ResourceId {
 
     /**
      * List of node keys.
      */
-    private List<NodeKey> nodeKeyList;
+    private final List<NodeKey> nodeKeyList;
 
     /**
      * Create object from builder.
@@ -43,7 +45,7 @@
      * @param builder initialized builder
      */
     public ResourceId(Builder builder) {
-        nodeKeyList = builder.nodeKeyList;
+        nodeKeyList = ImmutableList.copyOf(builder.nodeKeyList);
     }
 
     /**