commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r828899 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/AggregateTranslator.java
Date Fri, 23 Oct 2009 00:24:27 GMT
Author: sebb
Date: Fri Oct 23 00:24:27 2009
New Revision: 828899

URL: http://svn.apache.org/viewvc?rev=828899&view=rev
Log:
Make private field final to improve thread safety

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/AggregateTranslator.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/AggregateTranslator.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/AggregateTranslator.java?rev=828899&r1=828898&r2=828899&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/AggregateTranslator.java
(original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/translate/AggregateTranslator.java
Fri Oct 23 00:24:27 2009
@@ -26,7 +26,7 @@
  */
 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 @@
      * @param translators CharSequenceTranslator array to aggregate
      */
     public AggregateTranslator(CharSequenceTranslator... translators) {
+        // TODO - copy array to prevent subsequent external changes
         this.translators = translators;
     }
 



Mime
View raw message