From bb0d189f1b4a1a909d7e7e2b65e70b46e21dcbb4 Mon Sep 17 00:00:00 2001 From: Henri Yandell Date: Wed, 3 Mar 2010 09:16:38 +0000 Subject: [PATCH] Adding ThreadSafe notes to some obviously threadsafe classes (LANG-370) git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@918369 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/commons/lang3/ArrayUtils.java | 1 + src/main/java/org/apache/commons/lang3/BooleanUtils.java | 1 + src/main/java/org/apache/commons/lang3/CharSetUtils.java | 1 + src/main/java/org/apache/commons/lang3/CharUtils.java | 1 + src/main/java/org/apache/commons/lang3/EnumUtils.java | 1 + src/main/java/org/apache/commons/lang3/ObjectUtils.java | 1 + src/main/java/org/apache/commons/lang3/Pair.java | 2 ++ src/main/java/org/apache/commons/lang3/RandomStringUtils.java | 1 + src/main/java/org/apache/commons/lang3/SerializationUtils.java | 1 + src/main/java/org/apache/commons/lang3/StringEscapeUtils.java | 1 + src/main/java/org/apache/commons/lang3/StringUtils.java | 1 + src/main/java/org/apache/commons/lang3/SystemUtils.java | 1 + 12 files changed, 13 insertions(+) diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java b/src/main/java/org/apache/commons/lang3/ArrayUtils.java index ff8731cb8..5fb7cc7a7 100644 --- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java +++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java @@ -33,6 +33,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; * array input. However, an Object array that contains a null * element may throw an exception. Each method documents its behaviour.

* + *

#ThreadSafe# * @author Apache Software Foundation * @author Moritz Petersen * @author Fredrik Westermarck diff --git a/src/main/java/org/apache/commons/lang3/BooleanUtils.java b/src/main/java/org/apache/commons/lang3/BooleanUtils.java index 80f4f3198..daa1d556c 100644 --- a/src/main/java/org/apache/commons/lang3/BooleanUtils.java +++ b/src/main/java/org/apache/commons/lang3/BooleanUtils.java @@ -25,6 +25,7 @@ import org.apache.commons.lang3.math.NumberUtils; * An exception will not be thrown for a null input. * Each method documents its behaviour in more detail.

* + *

#ThreadSafe# * @author Apache Software Foundation * @author Matthew Hawthorne * @author Gary Gregory diff --git a/src/main/java/org/apache/commons/lang3/CharSetUtils.java b/src/main/java/org/apache/commons/lang3/CharSetUtils.java index 6add0e2fa..cd2c1dbb9 100644 --- a/src/main/java/org/apache/commons/lang3/CharSetUtils.java +++ b/src/main/java/org/apache/commons/lang3/CharSetUtils.java @@ -23,6 +23,7 @@ package org.apache.commons.lang3; * An exception will not be thrown for a null input. * Each method documents its behaviour in more detail.

* + *

#ThreadSafe# * @see CharSet * @author Apache Software Foundation * @author Phil Steitz diff --git a/src/main/java/org/apache/commons/lang3/CharUtils.java b/src/main/java/org/apache/commons/lang3/CharUtils.java index e144f50e5..4f08fb87d 100644 --- a/src/main/java/org/apache/commons/lang3/CharUtils.java +++ b/src/main/java/org/apache/commons/lang3/CharUtils.java @@ -23,6 +23,7 @@ package org.apache.commons.lang3; * An exception will not be thrown for a null input. * Each method documents its behaviour in more detail.

* + *

#ThreadSafe# * @author Apache Software Foundation * @since 2.1 * @version $Id$ diff --git a/src/main/java/org/apache/commons/lang3/EnumUtils.java b/src/main/java/org/apache/commons/lang3/EnumUtils.java index 8bb566fd4..16a3deff2 100644 --- a/src/main/java/org/apache/commons/lang3/EnumUtils.java +++ b/src/main/java/org/apache/commons/lang3/EnumUtils.java @@ -25,6 +25,7 @@ import java.util.Map; /** * Utility library to provide helper methods for Java enums. * + *

#ThreadSafe# * @author Apache Software Foundation */ public class EnumUtils { diff --git a/src/main/java/org/apache/commons/lang3/ObjectUtils.java b/src/main/java/org/apache/commons/lang3/ObjectUtils.java index e2b2cf08c..f5ba69f51 100644 --- a/src/main/java/org/apache/commons/lang3/ObjectUtils.java +++ b/src/main/java/org/apache/commons/lang3/ObjectUtils.java @@ -29,6 +29,7 @@ import org.apache.commons.lang3.exception.CloneFailedException; * An exception will generally not be thrown for a null input. * Each method documents its behaviour in more detail.

* + *

#ThreadSafe# * @author Apache Software Foundation * @author Nissim Karpenstein * @author Janek Bogucki diff --git a/src/main/java/org/apache/commons/lang3/Pair.java b/src/main/java/org/apache/commons/lang3/Pair.java index 6d6e109aa..fef8e4996 100644 --- a/src/main/java/org/apache/commons/lang3/Pair.java +++ b/src/main/java/org/apache/commons/lang3/Pair.java @@ -22,6 +22,8 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** * A basic immutable Object pair. + * + *

#ThreadSafe# * @since Lang 3.0 * @author Matt Benson */ diff --git a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java index d61fa31f1..bb78ef504 100644 --- a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java +++ b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java @@ -28,6 +28,7 @@ import java.util.Random; * 56320 (dc00) to 57343 (dfff) then it is placed after a randomly * chosen high surrogate.

* + *

#ThreadSafe# * @author Apache Software Foundation * @author Steven Caswell * @author Gary Gregory diff --git a/src/main/java/org/apache/commons/lang3/SerializationUtils.java b/src/main/java/org/apache/commons/lang3/SerializationUtils.java index b9370f24a..45a4a40b1 100644 --- a/src/main/java/org/apache/commons/lang3/SerializationUtils.java +++ b/src/main/java/org/apache/commons/lang3/SerializationUtils.java @@ -38,6 +38,7 @@ import java.io.Serializable; *

This class throws exceptions for invalid null inputs. * Each method documents its behaviour in more detail.

* + *

#ThreadSafe# * @author Apache Software Foundation * @author Nissim Karpenstein * @author Janek Bogucki diff --git a/src/main/java/org/apache/commons/lang3/StringEscapeUtils.java b/src/main/java/org/apache/commons/lang3/StringEscapeUtils.java index c4728c64d..0a01b3f7d 100644 --- a/src/main/java/org/apache/commons/lang3/StringEscapeUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringEscapeUtils.java @@ -31,6 +31,7 @@ import org.apache.commons.lang3.text.translate.UnicodeUnescaper; *

Escapes and unescapes Strings for * Java, Java Script, HTML and XML.

* + *

#ThreadSafe# * @author Apache Software Foundation * @author Apache Jakarta Turbine * @author Purple Technology diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index 9baa57eb0..748bc75b4 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -99,6 +99,7 @@ import org.apache.commons.lang3.text.WordUtils; *

Methods in this class give sample code to explain their operation. * The symbol * is used to indicate any input including null.

* + *

#ThreadSafe# * @see java.lang.String * @author Apache Software Foundation * @author Apache Jakarta Turbine diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java index 2927a2710..82ed16292 100644 --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java @@ -25,6 +25,7 @@ import java.io.File; * the corresponding field in this class will be set to null * and a message will be written to System.err.

* + *

#ThreadSafe# * @author Apache Software Foundation * @author Based on code from Avalon Excalibur * @author Based on code from Lucene