You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2013/04/30 23:29:26 UTC
svn commit: r1477838 -
/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java
Author: tn
Date: Tue Apr 30 21:29:26 2013
New Revision: 1477838
URL: http://svn.apache.org/r1477838
Log:
[COLLECTIONS-453] Clone input parameters for InstantiateTransformer.
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java?rev=1477838&r1=1477837&r2=1477838&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/InstantiateTransformer.java Tue Apr 30 21:29:26 2013
@@ -70,8 +70,6 @@ public class InstantiateTransformer<T> i
if (paramTypes == null || paramTypes.length == 0) {
return new InstantiateTransformer<T>();
}
- paramTypes = paramTypes.clone();
- args = args.clone();
return new InstantiateTransformer<T>(paramTypes, args);
}
@@ -87,14 +85,16 @@ public class InstantiateTransformer<T> i
/**
* Constructor that performs no validation.
* Use <code>instantiateTransformer</code> if you want that.
+ * <p>
+ * Note: from 4.0, the input parameters will be cloned
*
- * @param paramTypes the constructor parameter types, not cloned
- * @param args the constructor arguments, not cloned
+ * @param paramTypes the constructor parameter types
+ * @param args the constructor arguments
*/
public InstantiateTransformer(final Class<?>[] paramTypes, final Object[] args) {
super();
- iParamTypes = paramTypes;
- iArgs = args;
+ iParamTypes = paramTypes.clone();
+ iArgs = args.clone();
}
/**