You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2022/11/09 15:34:49 UTC
svn commit: r1905203 - in /jackrabbit/branches/2.16: ./ jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java
Author: reschke
Date: Wed Nov 9 15:34:49 2022
New Revision: 1905203
URL: http://svn.apache.org/viewvc?rev=1905203&view=rev
Log:
JCR-4849: spi: document Name.toString() restrictions with respect to invalid namespace names (merged r1904260 and 1904263 into 2.16)
Modified:
jackrabbit/branches/2.16/ (props changed)
jackrabbit/branches/2.16/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java
Propchange: jackrabbit/branches/2.16/
------------------------------------------------------------------------------
Merged /jackrabbit/trunk:r1904260,1904263
Modified: jackrabbit/branches/2.16/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.16/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java?rev=1905203&r1=1905202&r2=1905203&view=diff
==============================================================================
--- jackrabbit/branches/2.16/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java (original)
+++ jackrabbit/branches/2.16/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java Wed Nov 9 15:34:49 2022
@@ -25,13 +25,23 @@ import java.io.Serializable;
* <p>
* A <code>Name</code> is immutable once created.
* <p>
- * The String representation of a <code>Name</code> object must be in the
- * format "<code>{namespaceURI}localPart</code>".
+ * The String representation of a {@link Name} object must be in the format
+ * "<code>{namespaceURI}localPart</code>" (called the "expanded form" in the
+ * <a href=
+ * "https://s.apache.org/jcr-2.0-spec/3_Repository_Model.html#3.2.5.1%20Expanded%20Form">Section
+ * 3.2.5.1 of the JCR 2.0 specification</a>).
+ * <p>
+ * <em>Warning:</em> the expanded form can be used in certain JCR methods, but
+ * will not work in case the namespace URI is not an empty string nor an
+ * (absolute) URI (as per
+ * <a href="https://www.rfc-editor.org/rfc/rfc3986#section-3">RFC 3986, Section
+ * 3</a>).
* <p>
* An implementation of the <code>Name</code> interface must implement the
* {@link Object#equals(Object)} method such that two Name objects are equal if
* both the namespace URI and the local part are equal.
*/
+@SuppressWarnings("rawtypes")
public interface Name extends Comparable, Cloneable, Serializable {
// default namespace (empty uri)