Make private field final to improve thread safety
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@828899 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8ee228155c
commit
e226ac7de9
|
@ -26,7 +26,7 @@ import java.io.Writer;
|
|||
*/
|
||||
public class AggregateTranslator extends CharSequenceTranslator {
|
||||
|
||||
private CharSequenceTranslator[] translators;
|
||||
private final CharSequenceTranslator[] translators;
|
||||
|
||||
/**
|
||||
* Specify the translators to be used at creation time.
|
||||
|
@ -34,6 +34,7 @@ public class AggregateTranslator extends CharSequenceTranslator {
|
|||
* @param translators CharSequenceTranslator array to aggregate
|
||||
*/
|
||||
public AggregateTranslator(CharSequenceTranslator... translators) {
|
||||
// TODO - copy array to prevent subsequent external changes
|
||||
this.translators = translators;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue