commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r1056988 - in /commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang: ./ builder/ math/ mutable/ reflect/ time/
Date Sun, 09 Jan 2011 17:58:54 GMT
Author: niallp
Date: Sun Jan  9 17:58:53 2011
New Revision: 1056988

URL: http://svn.apache.org/viewvc?rev=1056988&view=rev
Log:
Port LANG-370 to LANG 2.x Branch - Document thread safety of classes

Modified:
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/BooleanUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharRange.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharSet.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharSetUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ObjectUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/RandomStringUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/SerializationUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/StringEscapeUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/StringUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/SystemUtils.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/package.html
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/math/package.html
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/mutable/package.html
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/package.html
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/reflect/package.html
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/StopWatch.java
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/package.html

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java
Sun Jan  9 17:58:53 2011
@@ -34,6 +34,7 @@ import org.apache.commons.lang.builder.T
  * array input. However, an Object array that contains a <code>null</code>
  * element may throw an exception. Each method documents its behaviour.</p>
  *
+ * <p>#ThreadSafe#</p>
  * @author Apache Software Foundation
  * @author Moritz Petersen
  * @author <a href="mailto:fredrik@westermarck.com">Fredrik Westermarck</a>

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/BooleanUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/BooleanUtils.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/BooleanUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/BooleanUtils.java
Sun Jan  9 17:58:53 2011
@@ -25,6 +25,7 @@ import org.apache.commons.lang.math.Numb
  * An exception will not be thrown for a <code>null</code> input.
  * Each method documents its behaviour in more detail.</p>
  * 
+ * <p>#ThreadSafe#</p>
  * @author Apache Software Foundation
  * @author Matthew Hawthorne
  * @author Gary Gregory

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharRange.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharRange.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharRange.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharRange.java
Sun Jan  9 17:58:53 2011
@@ -25,6 +25,7 @@ import java.util.NoSuchElementException;
  * 
  * <p>Instances are immutable.</p>
  *
+ * <p>#ThreadSafe#</p>
  * @author Apache Software Foundation
  * @author Chris Feldhacker
  * @author Gary Gregory
@@ -285,6 +286,7 @@ public final class CharRange implements 
     /**
      * <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
      */
@@ -294,6 +296,7 @@ public final class CharRange implements 
 
     /**
      * Character {@link Iterator}.
+     * <p>#NotThreadSafe#</p>
      */
     private static class CharacterIterator implements Iterator {
         /** The current character */

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharSet.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharSet.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharSet.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharSet.java
Sun Jan  9 17:58:53 2011
@@ -29,6 +29,7 @@ import java.util.Set;
  *
  * <p>Instances are immutable, but instances of subclasses may not be.</p>
  *
+ * <p>#ThreadSafe#</p>
  * @author Apache Software Foundation
  * @author Phil Steitz
  * @author Pete Gieser

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharSetUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharSetUtils.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharSetUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharSetUtils.java
Sun Jan  9 17:58:53 2011
@@ -23,6 +23,7 @@ package org.apache.commons.lang;
  * An exception will not be thrown for a <code>null</code> input.
  * Each method documents its behaviour in more detail.</p>
  * 
+ * <p>#ThreadSafe#</p>
  * @see CharSet
  * @author Apache Software Foundation
  * @author Phil Steitz

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharUtils.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/CharUtils.java
Sun Jan  9 17:58:53 2011
@@ -23,6 +23,7 @@ package org.apache.commons.lang;
  * An exception will not be thrown for a <code>null</code> input.
  * Each method documents its behaviour in more detail.</p>
  * 
+ * <p>#ThreadSafe#</p>
  * @author Apache Software Foundation
  * @since 2.1
  * @version $Id$

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ObjectUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ObjectUtils.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ObjectUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ObjectUtils.java
Sun Jan  9 17:58:53 2011
@@ -30,6 +30,7 @@ import org.apache.commons.lang.reflect.M
  * An exception will generally not be thrown for a <code>null</code> input.
  * Each method documents its behaviour in more detail.</p>
  *
+ * <p>#ThreadSafe#</p>
  * @author Apache Software Foundation
  * @author <a href="mailto:nissim@nksystems.com">Nissim Karpenstein</a>
  * @author <a href="mailto:janekdb@yahoo.co.uk">Janek Bogucki</a>
@@ -40,6 +41,7 @@ import org.apache.commons.lang.reflect.M
  * @since 1.0
  * @version $Id$
  */
+//@Immutable
 public class ObjectUtils {
 
     /**

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/RandomStringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/RandomStringUtils.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/RandomStringUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/RandomStringUtils.java
Sun Jan  9 17:58:53 2011
@@ -28,6 +28,7 @@ import java.util.Random;
  * 56320 (dc00) to 57343 (dfff) then it is placed after a randomly 
  * chosen high surrogate. </p>
  *
+ * <p>#ThreadSafe#</p>
  * @author Apache Software Foundation
  * @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
  * @author Gary Gregory

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/SerializationUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/SerializationUtils.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/SerializationUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/SerializationUtils.java
Sun Jan  9 17:58:53 2011
@@ -38,6 +38,7 @@ import java.io.Serializable;
  * <p>This class throws exceptions for invalid <code>null</code> inputs.
  * Each method documents its behaviour in more detail.</p>
  *
+ * <p>#ThreadSafe#</p>
  * @author Apache Software Foundation
  * @author <a href="mailto:nissim@nksystems.com">Nissim Karpenstein</a>
  * @author <a href="mailto:janekdb@yahoo.co.uk">Janek Bogucki</a>

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/StringEscapeUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/StringEscapeUtils.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/StringEscapeUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/StringEscapeUtils.java
Sun Jan  9 17:58:53 2011
@@ -27,6 +27,7 @@ import org.apache.commons.lang.exception
  * <p>Escapes and unescapes <code>String</code>s for
  * Java, Java Script, HTML, XML, and SQL.</p>
  *
+ * <p>#ThreadSafe#</p>
  * @author Apache Software Foundation
  * @author Apache Jakarta Turbine
  * @author Purple Technology

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/StringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/StringUtils.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/StringUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/StringUtils.java
Sun Jan  9 17:58:53 2011
@@ -98,6 +98,7 @@ import java.util.Locale;
  * <p>Methods in this class give sample code to explain their operation.
  * The symbol <code>*</code> is used to indicate any input including <code>null</code>.</p>
  *
+ * <p>#ThreadSafe#</p>
  * @see java.lang.String
  * @author Apache Software Foundation
  * @author <a href="http://jakarta.apache.org/turbine/">Apache Jakarta Turbine</a>
@@ -121,6 +122,7 @@ import java.util.Locale;
  * @since 1.0
  * @version $Id$
  */
+//@Immutable
 public class StringUtils {
     // Performance testing notes (JDK 1.4, Jul03, scolebourne)
     // Whitespace:

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/SystemUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/SystemUtils.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/SystemUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/SystemUtils.java
Sun Jan  9 17:58:53 2011
@@ -29,6 +29,10 @@ import java.io.File;
  * and a message will be written to <code>System.err</code>.
  * </p>
  * 
+ * <p>
+ * #ThreadSafe#
+ * </p>
+ * 
  * @author Apache Software Foundation
  * @author Based on code from Avalon Excalibur
  * @author Based on code from Lucene

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/package.html
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/package.html?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/package.html
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/builder/package.html
Sun Jan  9 17:58:53 2011
@@ -23,5 +23,6 @@ Assists in creating consistent <code>equ
 @see java.lang.Object#hashCode()
 @see java.lang.Comparable#compareTo(Object)
 @since 1.0
+<p>These classes are not thread-safe.</p>
 </body>
 </html>

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/math/package.html
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/math/package.html?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/math/package.html
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/math/package.html
Sun Jan  9 17:58:53 2011
@@ -19,5 +19,6 @@ limitations under the License.
 Extends {@link java.math} for business mathematical classes. This package is intended for
business
 mathematical use, not scientific use.
 @since 2.0
+<p>These classes are immutable, and therefore thread-safe.</p>
 </body>
 </html>

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/mutable/package.html
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/mutable/package.html?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/mutable/package.html
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/mutable/package.html
Sun Jan  9 17:58:53 2011
@@ -24,5 +24,6 @@
 <body>
 Provides typed mutable wrappers to primitive values and Object.
 @since 2.1
+<p>These classes are not thread-safe.</p>
 </body>
 </html>

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/package.html
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/package.html?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/package.html
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/package.html
Sun Jan  9 17:58:53 2011
@@ -19,5 +19,7 @@ limitations under the License.
 Provides highly reusable static utility methods, chiefly concerned 
 with adding value to {@link java.lang} and other standard core classes.
 @since 1.0
+<p>Most of these classes are immutable and thus thread-safe. 
+However Charset is not currently guaranteed thread-safe under all circumstances.</p>
 </body>
 </html>

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/reflect/package.html
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/reflect/package.html?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/reflect/package.html
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/reflect/package.html
Sun Jan  9 17:58:53 2011
@@ -24,5 +24,6 @@
 <body>
 Accumulates common high-level uses of the <code>java.lang.reflect</code> APIs.
 @since 2.5
+<p>These classes are immutable, and therefore thread-safe.</p>
 </body>
 </html>

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/StopWatch.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/StopWatch.java?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/StopWatch.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/StopWatch.java
Sun Jan  9 17:58:53 2011
@@ -50,6 +50,8 @@ package org.apache.commons.lang.time;
  * 4. start() cannot be called twice without calling reset()
  * </p>
  * 
+ * <p>This class is not thread-safe</p>
+ * 
  * @author Apache Software Foundation
  * @since 2.0
  * @version $Id$

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/package.html
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/package.html?rev=1056988&r1=1056987&r2=1056988&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/package.html
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/package.html
Sun Jan  9 17:58:53 2011
@@ -27,5 +27,6 @@ This includes:
 <li><code>StopWatch</code> - a duration timer
 </ul>
 @since 2.0
+<p>These classes are immutable (and therefore thread-safe) apart from {@link StopWatch}.</p>
 </body>
 </html>



Mime
View raw message