commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r918829 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharRange.java
Date Thu, 04 Mar 2010 02:57:03 GMT
Author: sebb
Date: Thu Mar  4 02:57:03 2010
New Revision: 918829

URL: http://svn.apache.org/viewvc?rev=918829&view=rev
Log:
Iterator is not threadsafe
Make private field final

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharRange.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharRange.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharRange.java?rev=918829&r1=918828&r2=918829&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharRange.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharRange.java Thu Mar
 4 02:57:03 2010
@@ -254,6 +254,7 @@
     /**
      * <p>Returns an iterator which can be used to walk through the characters described
by this range.</p>
      *
+     * <p>#NotThreadSafe# the iterator is not threadsafe</p>
      * @return an iterator to the chars represented by this range
      * @since 2.5
      */
@@ -263,12 +264,13 @@
 
     /**
      * Character {@link Iterator}.
+     * <p>#NotThreadSafe#</p>
      */
     private static class CharacterIterator implements Iterator<Character> {
         /** The current character */
         private char current;
 
-        private CharRange range;
+        private final CharRange range;
         private boolean hasNext;
 
         /**



Mime
View raw message