jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1332214 - in /jackrabbit/oak/trunk: oak-it/jcr/pom.xml oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
Date Mon, 30 Apr 2012 14:07:57 GMT
Author: reschke
Date: Mon Apr 30 14:07:57 2012
New Revision: 1332214

URL: http://svn.apache.org/viewvc?rev=1332214&view=rev
Log:
OAK-6: fix getAncestory(currentdepth) on properties

Modified:
    jackrabbit/oak/trunk/oak-it/jcr/pom.xml
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java

Modified: jackrabbit/oak/trunk/oak-it/jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/jcr/pom.xml?rev=1332214&r1=1332213&r2=1332214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-it/jcr/pom.xml Mon Apr 30 14:07:57 2012
@@ -44,7 +44,6 @@
             <property>
               <name>known.issues</name>
               <value>
-org.apache.jackrabbit.test.api.PropertyReadMethodsTest
 org.apache.jackrabbit.test.api.NodeDiscoveringNodeTypesTest#testIsNodeType
 org.apache.jackrabbit.test.api.NamespaceRemappingTest#testNamespaceRemapping
 org.apache.jackrabbit.test.api.NamespaceRemappingTest#testExceptionOnUnknownPrefix

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java?rev=1332214&r1=1332213&r2=1332214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
Mon Apr 30 14:07:57 2012
@@ -84,7 +84,10 @@ public class PropertyImpl extends ItemIm
      */
     @Override
     public Item getAncestor(int depth) throws RepositoryException {
-        if (depth == getDepth() - 1) {
+        int mydepth = getDepth();
+        if (depth == mydepth) {
+            return this;
+        } else if (depth == mydepth - 1) {
             return getParent();
         } else {
             return getParent().getAncestor(depth);



Mime
View raw message