jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1344246 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
Date Wed, 30 May 2012 13:26:00 GMT
Author: thomasm
Date: Wed May 30 13:26:00 2012
New Revision: 1344246

URL: http://svn.apache.org/viewvc?rev=1344246&view=rev
Log:
OAK-77 Consolidate Utilities - use PathUtils.elements instead of PathUtils.split

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java?rev=1344246&r1=1344245&r2=1344246&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
Wed May 30 13:26:00 2012
@@ -60,12 +60,10 @@ public class PropertyValueImpl extends D
         }
         // TODO really support relative properties?
         NodeImpl n = selector.currentNode();
-        String[] elements = PathUtils.split(propertyName);
-        for (int i = 0; i < elements.length - 1; i++) {
+        for (String p : PathUtils.elements(PathUtils.getParentPath(propertyName))) {
             if (n == null) {
                 return null;
             }
-            String p = elements[i];
             if (!n.exists(p)) {
                 return null;
             }



Mime
View raw message