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:
Sebastian Bazley 2009-10-23 00:24:27 +00:00
parent 8ee228155c
commit e226ac7de9
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}