You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by md...@apache.org on 2013/04/02 14:48:45 UTC

svn commit: r1463510 - /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java

Author: mduerig
Date: Tue Apr  2 12:48:44 2013
New Revision: 1463510

URL: http://svn.apache.org/r1463510
Log:
JCR-3465: JcrUtils.getOrCreateByPath() creates a whole subtree instead of a single branch
applied proposed patch adding clarifying Javadoc

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java?rev=1463510&r1=1463509&r2=1463510&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java Tue Apr  2 12:48:44 2013
@@ -1018,10 +1018,13 @@ public class JcrUtils {
     }
 
     /**
-     * Creates or gets the {@link javax.jcr.Node Node} at the given Path. In
-     * case it has to create the Node all non-existent intermediate
+     * Creates or gets the {@link javax.jcr.Node node} at the given path. In
+     * case it has to create the node, nodes for all non-existent intermediate
      * path-elements will be created with the given intermediate node type and
      * the returned node will be created with the given nodeType.
+     * <b>Note</b>: When the given path contains parent elements this method might
+     * create multiple nodes at leaf position (e.g "a/../b" will create the
+     * child nodes "a" and "b" on the current node).
      *
      * <p>
      * If the node name points to an existing node, the node name will be
@@ -1055,12 +1058,13 @@ public class JcrUtils {
     }
 
     /**
-     * Creates or gets the {@link javax.jcr.Node Node} at the given path
-     * relative to the baseNode. In case it has to create the Node all
-     * non-existent intermediate path-elements will be created with the given
+     * Creates or gets the {@link javax.jcr.Node node} at the given path
+     * relative to the baseNode. In case it has to create the node, nodes for
+     * all non-existent intermediate path-elements will be created with the given
      * intermediate node type and the returned node will be created with the
-     * given nodeType.
-     *
+     * given nodeType. <b>Note</b>: When the given path contains parent elements
+     * this method might create multiple nodes at leaf position (e.g "a/../b"
+     * will create the child nodes "a" and "b" on the current node).
      * <p>
      * If the parameter <code>createUniqueLeaf</code> is set, it will not get
      * an existing node but rather try to create a unique node by appending a