Clone the passed in array
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@884490 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0abdedcd16
commit
b1ac38cb1b
|
@ -19,6 +19,8 @@ package org.apache.commons.lang.text.translate;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes a sequence of translators one after the other. Execution ends whenever
|
* Executes a sequence of translators one after the other. Execution ends whenever
|
||||||
* the first translator consumes codepoints from the input.
|
* the first translator consumes codepoints from the input.
|
||||||
|
@ -36,8 +38,7 @@ public class AggregateTranslator extends CharSequenceTranslator {
|
||||||
* @param translators CharSequenceTranslator array to aggregate
|
* @param translators CharSequenceTranslator array to aggregate
|
||||||
*/
|
*/
|
||||||
public AggregateTranslator(CharSequenceTranslator... translators) {
|
public AggregateTranslator(CharSequenceTranslator... translators) {
|
||||||
// TODO - copy array to prevent subsequent external changes
|
this.translators = ArrayUtils.clone(translators);
|
||||||
this.translators = translators;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue