[COLLECTIONS-453] Clone input parameters for InstantiateTransformer.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1477838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-04-30 21:29:26 +00:00
parent 10a5e1c698
commit 05f3b74fd5
1 changed files with 6 additions and 6 deletions

View File

@ -70,8 +70,6 @@ public class InstantiateTransformer<T> implements Transformer<Class<? extends T>
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> implements Transformer<Class<? extends T>
/**
* 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();
}
/**