jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1417349 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java oak-jcr/pom.xml
Date Wed, 05 Dec 2012 10:50:09 GMT
Author: thomasm
Date: Wed Dec  5 10:50:09 2012
New Revision: 1417349

URL: http://svn.apache.org/viewvc?rev=1417349&view=rev
Log:
OAK-475 Query tck test SameNodeJoinConditionTest failing with ParseException

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java
    jackrabbit/oak/trunk/oak-jcr/pom.xml

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java?rev=1417349&r1=1417348&r2=1417349&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java
Wed Dec  5 10:50:09 2012
@@ -81,20 +81,24 @@ public class SameNodeJoinConditionImpl e
     public void restrict(FilterImpl f) {
         if (f.getSelector() == selector1) {
             String p2 = selector2.currentPath();
-            if (selector2Path.equals(".")) {
-                f.restrictPath(p2, Filter.PathRestriction.EXACT);
-            } else {
-                // TODO normalize paths; support more complex relative path (".." and so
on)
-                String p = PathUtils.concat(p2, selector2Path);
-                f.restrictPath(p, Filter.PathRestriction.EXACT);
+            if (p2 != null) {
+                if (selector2Path.equals(".")) {
+                    f.restrictPath(p2, Filter.PathRestriction.EXACT);
+                } else {
+                    // TODO normalize paths; support more complex relative path (".." and
so on)
+                    String p = PathUtils.concat(p2, selector2Path);
+                    f.restrictPath(p, Filter.PathRestriction.EXACT);
+                }
             }
         }
         if (f.getSelector() == selector2) {
-            if (selector2Path.equals(".")) {
-                String p1 = selector1.currentPath();
-                f.restrictPath(p1, Filter.PathRestriction.EXACT);
-            } else {
-                // TODO normalize paths; support relative path (".." and so on)
+            String p1 = selector1.currentPath();
+            if (p1 != null) {
+                if (selector2Path.equals(".")) {
+                    f.restrictPath(p1, Filter.PathRestriction.EXACT);
+                } else {
+                    // TODO normalize paths; support relative path (".." and so on)
+                }
             }
         }
     }

Modified: jackrabbit/oak/trunk/oak-jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/pom.xml?rev=1417349&r1=1417348&r2=1417349&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-jcr/pom.xml Wed Dec  5 10:50:09 2012
@@ -202,7 +202,6 @@
       org.apache.jackrabbit.test.api.query.qom.ColumnTest#testExpandColumnsForNodeType  
            <!-- OAK-323 -->
       org.apache.jackrabbit.test.api.query.GetPropertyNamesTest#testGetPropertyNames    
            <!-- OAK-323 -->
       org.apache.jackrabbit.test.api.query.qom.SelectorTest#testUnknownNodeType         
            <!-- OAK-476 -->
-      org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testRightOuterJoinWithPath
 <!-- OAK-475 -->
       org.apache.jackrabbit.test.api.observation.EventTest#testGetUserId
       org.apache.jackrabbit.test.api.observation.NodeMovedTest#testMoveNode
       org.apache.jackrabbit.test.api.observation.NodeMovedTest#testMoveTree



Mime
View raw message