[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:
parent
10a5e1c698
commit
05f3b74fd5
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue