jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1406124 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast: DescendantNodeImpl.java SelectorImpl.java
Date Tue, 06 Nov 2012 13:17:12 GMT
Author: thomasm
Date: Tue Nov  6 13:17:11 2012
New Revision: 1406124

URL: http://svn.apache.org/viewvc?rev=1406124&view=rev
Log:
OAK-423 Query: org.apache.jackrabbit.oak.spi.query.Cursor.currentRow called too late

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java?rev=1406124&r1=1406123&r2=1406124&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java
Tue Nov  6 13:17:11 2012
@@ -39,8 +39,11 @@ public class DescendantNodeImpl extends 
     @Override
     public boolean evaluate() {
         String p = selector.currentPath();
+        if (p == null) {
+            return false;
+        }
         String path = getAbsolutePath(ancestorPath);
-        if (p == null || path == null) {
+        if (path == null) {
             return false;
         }
         return PathUtils.isAncestor(path, p);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java?rev=1406124&r1=1406123&r2=1406124&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
Tue Nov  6 13:17:11 2012
@@ -164,6 +164,7 @@ public class SelectorImpl extends Source
             }
             return true;
         }
+        cursor = null;
         return false;
     }
 



Mime
View raw message