8041529: Better parameterization of parameter lists
authorkizune
Thu, 08 May 2014 21:09:57 +0400
changeset 27071 887188b74516
parent 27070 55b657214bb9
child 27072 ced3a76913f3
8041529: Better parameterization of parameter lists Reviewed-by: twisti, ahgross
jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java	Wed Apr 23 09:06:22 2014 -1000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java	Thu May 08 21:09:57 2014 +0400
@@ -727,7 +727,7 @@
      * @return the parameter types (as an immutable list)
      */
     public List<Class<?>> parameterList() {
-        return Collections.unmodifiableList(Arrays.asList(ptypes));
+        return Collections.unmodifiableList(Arrays.asList(ptypes.clone()));
     }
 
     /*non-public*/ Class<?> lastParameterType() {