Merge "Added safe copy of array."
authorTony Tkacik <ttkacik@cisco.com>
Fri, 5 Sep 2014 07:55:28 +0000 (07:55 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 5 Sep 2014 07:55:28 +0000 (07:55 +0000)
code-generator/binding-generator-util/src/main/java/org/opendaylight/yangtools/binding/generator/util/Types.java

index a6a5ef5a41b699899a42c2a7d1cb615fcc65c5c6..91d56a3562bbcfcdff2f62e263c46e7e05fc3085 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.yangtools.binding.generator.util;
 
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -251,7 +252,7 @@ public final class Types {
         public ParametrizedTypeImpl(Type rawType, Type[] actTypes) {
             super(rawType.getPackageName(), rawType.getName());
             this.rawType = rawType;
-            this.actualTypes = actTypes;
+            this.actualTypes = Arrays.copyOf(actTypes, actTypes.length);
         }
 
     }