commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1333397 - in /commons/proper/codec/trunk/src/main/java/org/apache/commons/codec: ./ binary/ digest/ language/ language/bm/ net/
Date Thu, 03 May 2012 10:21:12 GMT
Author: sebb
Date: Thu May  3 10:21:11 2012
New Revision: 1333397

URL: http://svn.apache.org/viewvc?rev=1333397&view=rev
Log:
Add thread-safety Javadoc

Modified:
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/CharEncoding.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/Charsets.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/StringEncoderComparator.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BinaryCodec.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Hex.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/StringUtils.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/B64.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Crypt.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/AbstractCaverphone.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Caverphone1.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Caverphone2.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/ColognePhonetic.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Metaphone.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Nysiis.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/RefinedSoundex.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Soundex.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/SoundexUtils.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Languages.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/ResourceConstants.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/BCodec.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/QCodec.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/Utils.java

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/CharEncoding.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/CharEncoding.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/CharEncoding.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/CharEncoding.java Thu
May  3 10:21:11 2012
@@ -47,6 +47,8 @@ package org.apache.commons.codec;
  * This perhaps would best belong in the [lang] project. Even if a similar interface is defined
in [lang], it is not
  * foreseen that [codec] would be made to depend on [lang].
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard
charsets</a>
  * @since 1.4
  * @version $Id$

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/Charsets.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/Charsets.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/Charsets.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/Charsets.java Thu May
 3 10:21:11 2012
@@ -49,6 +49,8 @@ import java.nio.charset.UnsupportedChars
  * This perhaps would best belong in the Commons Lang project. Even if a similar class is
defined in Commons Lang, it is
  * not foreseen that Commons Codec would be made to depend on Commons Lang.
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard
charsets</a>
  * @since 1.7
  * @version $Id: CharEncoding.java 1173287 2011-09-20 18:16:19Z ggregory $

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/StringEncoderComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/StringEncoderComparator.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/StringEncoderComparator.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/StringEncoderComparator.java
Thu May  3 10:21:11 2012
@@ -24,6 +24,8 @@ import java.util.Comparator;
  * Soundex, Metaphone, etc. This class can come in handy if one need to sort Strings by an
encoded form of a name such
  * as Soundex.
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @version $Id$
  */
 public class StringEncoderComparator implements Comparator {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BinaryCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BinaryCodec.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BinaryCodec.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BinaryCodec.java
Thu May  3 10:21:11 2012
@@ -25,6 +25,8 @@ import org.apache.commons.codec.EncoderE
 /**
  * Converts between byte arrays and strings of "0"s and "1"s.
  * 
+ * This class is immutable and thread-safe.
+ * 
  * TODO: may want to add more bit vector functions like and/or/xor/nand 
  * TODO: also might be good to generate boolean[] from byte[] et cetera.
  * 

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Hex.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Hex.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Hex.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Hex.java Thu
May  3 10:21:11 2012
@@ -31,6 +31,8 @@ import org.apache.commons.codec.EncoderE
  * Converts hexadecimal Strings. The charset used for certain operation can be set, the default
is set in
  * {@link #DEFAULT_CHARSET_NAME}
  * 
+ * This class is thread-safe.
+ * 
  * @since 1.1
  * @version $Id$
  */

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/StringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/StringUtils.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/StringUtils.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/StringUtils.java
Thu May  3 10:21:11 2012
@@ -27,6 +27,8 @@ import org.apache.commons.codec.Charsets
  * Converts String to and from bytes using the encodings required by the Java specification.
These encodings are specified in <a
  * href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard
charsets</a>
  * 
+ * This class is immutable and thread-safe.
+ *
  * @see CharEncoding
  * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard
charsets</a>
  * @version $Id$

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/B64.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/B64.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/B64.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/B64.java Thu
May  3 10:21:11 2012
@@ -23,6 +23,8 @@ import java.util.Random;
  * 
  * TODO: Can Base64 be reused?
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @version $Id$
  * @since 1.7
  */

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Crypt.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Crypt.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Crypt.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Crypt.java Thu
May  3 10:21:11 2012
@@ -23,6 +23,8 @@ import org.apache.commons.codec.Charsets
  * 
  * See {@link #crypt(String, String)} for further details.
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @version $Id$
  * @since 1.7
  */

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java
Thu May  3 10:21:11 2012
@@ -39,6 +39,8 @@ import org.apache.commons.codec.Charsets
  * The C style comments are from the original C code, the ones with "//" from the port.
  * </p>
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @version $Id$
  * @since 1.7
  */

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java
Thu May  3 10:21:11 2012
@@ -34,6 +34,8 @@ import java.util.regex.Pattern;
  * into the Public Domain.
  * </p>
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @version $Id$
  * @since 1.7
  */

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java
Thu May  3 10:21:11 2012
@@ -33,6 +33,8 @@ import org.apache.commons.codec.Charsets
  * This class is slightly incompatible if the given salt contains characters
  * that are not part of the allowed range [a-zA-Z0-9./].
  *
+ * This class is immutable and thread-safe.
+ *
  * @version $Id$
  * @since 1.7
  */
@@ -372,7 +374,9 @@ public class UnixCrypt {
             throw new IllegalArgumentException("Invalid salt value: " + salt);
         }
 
-        for (; salt.length() < 2; salt = salt + "A");
+        for (; salt.length() < 2; salt = salt + "A") {
+            // NOOP
+        }
         StringBuilder buffer = new StringBuilder("             ");
         char charZero = salt.charAt(0);
         char charOne = salt.charAt(1);

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/AbstractCaverphone.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/AbstractCaverphone.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/AbstractCaverphone.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/AbstractCaverphone.java
Thu May  3 10:21:11 2012
@@ -26,6 +26,8 @@ import org.apache.commons.codec.StringEn
  * This is an algorithm created by the Caversham Project at the University of Otago. It implements
the Caverphone 2.0
  * algorithm:
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @version $Id: Caverphone.java 1075947 2011-03-01 17:56:14Z ggregory $
  * @see <a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a>
  * @since 1.5

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Caverphone1.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Caverphone1.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Caverphone1.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Caverphone1.java
Thu May  3 10:21:11 2012
@@ -27,6 +27,8 @@ package org.apache.commons.codec.languag
  * @see <a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a>
  * @see <a href="http://caversham.otago.ac.nz/files/working/ctp060902.pdf">Caverphone
1.0 specification</a>
  * @since 1.5
+ * 
+ * This class is immutable and thread-safe.
  */
 public class Caverphone1 extends AbstractCaverphone {
 

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Caverphone2.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Caverphone2.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Caverphone2.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Caverphone2.java
Thu May  3 10:21:11 2012
@@ -27,6 +27,8 @@ package org.apache.commons.codec.languag
  * @see <a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a>
  * @see <a href="http://caversham.otago.ac.nz/files/working/ctp150804.pdf">Caverphone
2.0 specification</a>
  * @since 1.5
+ * 
+ * This class is immutable and thread-safe.
  */
 public class Caverphone2 extends AbstractCaverphone {
 

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/ColognePhonetic.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/ColognePhonetic.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/ColognePhonetic.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/ColognePhonetic.java
Thu May  3 10:21:11 2012
@@ -176,11 +176,18 @@ import org.apache.commons.codec.StringEn
  * 
  * </ul>
  * 
+ * This class is thread-safe.
+ * 
  * @see <a href="http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik">Wikipedia (de):
K&ouml;lner Phonetik (in German)</a>
  * @since 1.5
  */
 public class ColognePhonetic implements StringEncoder {
 
+    /**
+     * This class is not thread-safe; the field {@link #length} is mutable.
+     * However, it is not shared between threads, as it is constructed on demand
+     * by the method {@link ColognePhonetic#colognePhonetic(String)}
+     */
     private abstract class CologneBuffer {
 
         protected final char[] data;

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
Thu May  3 10:21:11 2012
@@ -27,6 +27,13 @@ import org.apache.commons.codec.StringEn
  * @see <a href="http://drdobbs.com/184401251?pgno=2">Original Article</a>
  * @see <a href="http://en.wikipedia.org/wiki/Metaphone">http://en.wikipedia.org/wiki/Metaphone</a>
  *
+ * This class is conditionally thread-safe.
+ * The instance field {@link #maxCodeLen} is mutable {@link #setMaxCodeLen(int)}
+ * but is not volatile, and accesses are not synchronised.
+ * If an instance of the class is shared between threads, the caller needs to ensure that
suitable synchronisation
+ * is used to ensure safe publication of the value between threads, and must not invoke {@link
#setMaxCodeLen(int)}
+ * after initial setup. 
+ * 
  * @version $Id$
  */
 public class DoubleMetaphone implements StringEncoder {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Metaphone.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Metaphone.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Metaphone.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Metaphone.java
Thu May  3 10:21:11 2012
@@ -37,6 +37,13 @@ import org.apache.commons.codec.StringEn
  * For more information, see <a href="https://issues.apache.org/jira/browse/CODEC-57">CODEC-57</a>.
  * </p>
  * 
+ * This class is conditionally thread-safe.
+ * The instance field {@link #maxCodeLen} is mutable {@link #setMaxCodeLen(int)}
+ * but is not volatile, and accesses are not synchronised.
+ * If an instance of the class is shared between threads, the caller needs to ensure that
suitable synchronisation
+ * is used to ensure safe publication of the value between threads, and must not invoke {@link
#setMaxCodeLen(int)}
+ * after initial setup. 
+ * 
  * @version $Id$
  */
 public class Metaphone implements StringEncoder {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Nysiis.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Nysiis.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Nysiis.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Nysiis.java
Thu May  3 10:21:11 2012
@@ -61,6 +61,8 @@ import org.apache.commons.codec.StringEn
  * 9. Add original first character of name as first character of key
  * </pre></p>
  *
+ * This class is immutable and thread-safe.
+ * 
  * @see <a href="http://en.wikipedia.org/wiki/NYSIIS">NYSIIS on Wikipedia</a>
  * @see <a href="http://www.dropby.com/NYSIIS.html">NYSIIS on dropby.com</a>
  * @see Soundex

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/RefinedSoundex.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/RefinedSoundex.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/RefinedSoundex.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/RefinedSoundex.java
Thu May  3 10:21:11 2012
@@ -25,6 +25,8 @@ import org.apache.commons.codec.StringEn
  * optimized for spell checking words. Soundex method originally developed by
  * <CITE>Margaret Odell</CITE> and <CITE>Robert Russell</CITE>.
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @version $Id$
  */
 public class RefinedSoundex implements StringEncoder {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Soundex.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Soundex.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Soundex.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Soundex.java
Thu May  3 10:21:11 2012
@@ -24,6 +24,9 @@ import org.apache.commons.codec.StringEn
  * Encodes a string into a Soundex value. Soundex is an encoding used to relate similar names,
but can also be used as a
  * general purpose scheme to find word with similar phonemes.
  * 
+ * This class is thread-safe.
+ * Although not strictly immutable, the {@link #maxLength} field is not actually used.
+ * 
  * @version $Id$
  */
 public class Soundex implements StringEncoder {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/SoundexUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/SoundexUtils.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/SoundexUtils.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/SoundexUtils.java
Thu May  3 10:21:11 2012
@@ -23,6 +23,8 @@ import org.apache.commons.codec.StringEn
 /**
  * Utility methods for {@link Soundex} and {@link RefinedSoundex} classes.
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @version $Id$
  * @since 1.3
  */

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Languages.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Languages.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Languages.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Languages.java
Thu May  3 10:21:11 2012
@@ -50,6 +50,8 @@ import java.util.Set;
  * </p>
  * 
  * @since 1.6
+ * 
+ * This class is immutable and thread-safe.
  */
 public class Languages {
     // Iimplementation note: This class is divided into two sections. The first part is a
static factory interface that

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java
Thu May  3 10:21:11 2012
@@ -163,6 +163,8 @@ public class PhoneticEngine {
      * matching rule was found, <code>phonemeBuilder</code> is replaced with
a new buidler containing the phonemes
      * updated by the matching rule.
      *
+     * Although this class is not thread-safe (it has mutable unprotected fields), it is
not shared between threads
+     * as it is constructed as needed by the calling methods.
      * @since 1.6
      */
     private static final class RulesApplication {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/ResourceConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/ResourceConstants.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/ResourceConstants.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/ResourceConstants.java
Thu May  3 10:21:11 2012
@@ -22,6 +22,8 @@ import org.apache.commons.codec.CharEnco
 /**
  * Constants used to process resource files.
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @since 1.6
  */
 class ResourceConstants {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/BCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/BCodec.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/BCodec.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/BCodec.java Thu
May  3 10:21:11 2012
@@ -40,6 +40,8 @@ import org.apache.commons.codec.binary.B
  * handling software.
  * </p>
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @see <a href="http://www.ietf.org/rfc/rfc1522.txt">MIME (Multipurpose Internet Mail
Extensions) Part Two: Message
  *          Header Extensions for Non-ASCII Text</a>
  * 

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/QCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/QCodec.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/QCodec.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/QCodec.java Thu
May  3 10:21:11 2012
@@ -41,6 +41,13 @@ import org.apache.commons.codec.StringEn
  * handling software.
  * </p>
  * 
+ * This class is conditionally thread-safe.
+ * The instance field {@link #encodeBlanks} is mutable {@link #setEncodeBlanks(boolean)}
+ * but is not volatile, and accesses are not synchronised.
+ * If an instance of the class is shared between threads, the caller needs to ensure that
suitable synchronisation
+ * is used to ensure safe publication of the value between threads, and must not invoke {@link
#setEncodeBlanks(boolean)}
+ * after initial setup. 
+ * 
  * @see <a href="http://www.ietf.org/rfc/rfc1522.txt">MIME (Multipurpose Internet Mail
Extensions) Part Two: Message
  *          Header Extensions for Non-ASCII Text</a>
  * 

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/QuotedPrintableCodec.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
Thu May  3 10:21:11 2012
@@ -55,6 +55,8 @@ import org.apache.commons.codec.binary.S
  * for those applications that do not require quoted-printable line formatting (rules #3,
#4, #5), for instance Q codec.
  * </p>
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @see <a href="http://www.ietf.org/rfc/rfc1521.txt"> RFC 1521 MIME (Multipurpose
Internet Mail Extensions) Part One:
  *          Mechanisms for Specifying and Describing the Format of Internet Message Bodies
</a>
  * 

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java
Thu May  3 10:21:11 2012
@@ -41,6 +41,8 @@ import org.apache.commons.codec.binary.S
  * Message Header Extensions for Non-ASCII Text</a>
  * </p>
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @since 1.3
  * @version $Id$
  */

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java Thu
May  3 10:21:11 2012
@@ -46,6 +46,8 @@ import org.apache.commons.codec.binary.S
  * 1.4 rely on the platform's default charset encoding.
  * </p>
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @since 1.2
  * @version $Id$
  */

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/Utils.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/Utils.java?rev=1333397&r1=1333396&r2=1333397&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/Utils.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/Utils.java Thu May
 3 10:21:11 2012
@@ -22,6 +22,8 @@ import org.apache.commons.codec.DecoderE
 /**
  * Utility methods for this package.
  * 
+ * This class is immutable and thread-safe.
+ * 
  * @version $Id$
  * @since 1.4
  */



Mime
View raw message