Skip to content

Commit 9e96cc4

Browse files
committed
Indicate the Namespace class is thread-safe
1 parent 5203035 commit 9e96cc4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/src/java/org/jdom2/Namespace.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
6363

6464
/**
6565
* An XML namespace representation, as well as a factory for creating XML
66-
* namespace objects.
66+
* namespace objects. All methods on Namespace (including
67+
* {@link #getNamespace(String)} and {@link #getNamespace(String, String)})
68+
* are thread-safe.
69+
*
6770
* <p>
6871
* See {@link NamespaceAware} for additional notes on how Namespaces are
6972
* 'in-scope' in JDOM content, and how those in-scope Namespaces are accessed.
@@ -113,6 +116,7 @@ public final class Namespace implements Serializable {
113116
/**
114117
* This will retrieve (if in existence) or create (if not) a
115118
* <code>Namespace</code> for the supplied <i>prefix</i> and <i>uri</i>.
119+
* This method is thread-safe.
116120
*
117121
* @param prefix <code>String</code> prefix to map to
118122
* <code>Namespace</code>.
@@ -221,6 +225,7 @@ public static Namespace getNamespace(final String prefix, final String uri) {
221225
* This will retrieve (if in existence) or create (if not) a
222226
* <code>Namespace</code> for the supplied URI, and make it usable
223227
* as a default namespace, as no prefix is supplied.
228+
* This method is thread-safe.
224229
*
225230
* @param uri <code>String</code> URI of new <code>Namespace</code>.
226231
* @return <code>Namespace</code> - ready to use namespace.

0 commit comments

Comments
 (0)