jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1382871 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java
Date Mon, 10 Sep 2012 14:23:01 GMT
Author: alexparvulescu
Date: Mon Sep 10 14:23:00 2012
New Revision: 1382871

URL: http://svn.apache.org/viewvc?rev=1382871&view=rev
Log:
OAK-237 Run Jackrabbit query tests

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java?rev=1382871&r1=1382870&r2=1382871&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java
Mon Sep 10 14:23:00 2012
@@ -18,12 +18,15 @@
  */
 package org.apache.jackrabbit.oak.jcr.query;
 
+import static org.apache.jackrabbit.oak.commons.PathUtils.concat;
+import static org.apache.jackrabbit.oak.commons.PathUtils.isAncestor;
+import static org.apache.jackrabbit.oak.commons.PathUtils.relativize;
+
 import org.apache.jackrabbit.commons.iterator.NodeIteratorAdapter;
 import org.apache.jackrabbit.commons.iterator.RowIteratorAdapter;
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.Result;
 import org.apache.jackrabbit.oak.api.ResultRow;
-import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.jcr.NodeDelegate;
 import org.apache.jackrabbit.oak.jcr.NodeImpl;
 import org.apache.jackrabbit.oak.jcr.SessionDelegate;
@@ -70,7 +73,8 @@ public class QueryResultImpl implements 
         if (path == null) {
             // a row without path (explain,...)
             return true;
-        } else if (PathUtils.isAncestor(pathFilter, path)) {
+        }
+        if (isAncestor(pathFilter, path) || pathFilter.equals(path)) {
             // a row within this workspace
             return true;
         }
@@ -137,7 +141,7 @@ public class QueryResultImpl implements 
     }
 
     String getLocalPath(String path) {
-        return PathUtils.concat("/", PathUtils.relativize(pathFilter, path));
+        return concat("/", relativize(pathFilter, path));
     }
 
     @Override



Mime
View raw message