jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r679093 - /jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/JCRSQLQueryBuilder.java
Date Wed, 23 Jul 2008 14:19:23 GMT
Author: mreutegg
Date: Wed Jul 23 07:19:23 2008
New Revision: 679093

URL: http://svn.apache.org/viewvc?rev=679093&view=rev
Log:
JCR-1688: Query parser builds invalid parse tree

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/JCRSQLQueryBuilder.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/JCRSQLQueryBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/JCRSQLQueryBuilder.java?rev=679093&r1=679092&r2=679093&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/JCRSQLQueryBuilder.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/JCRSQLQueryBuilder.java
Wed Jul 23 07:19:23 2008
@@ -470,7 +470,9 @@
         // pass to operands
         node.childrenAccept(this, andQuery);
 
-        parent.addOperand(andQuery);
+        if (andQuery.getNumOperands() > 0) {
+            parent.addOperand(andQuery);
+        }
         return parent;
     }
 
@@ -480,7 +482,9 @@
         // pass to operand
         node.childrenAccept(this, notQuery);
 
-        parent.addOperand(notQuery);
+        if (notQuery.getNumOperands() > 0) {
+            parent.addOperand(notQuery);
+        }
         return parent;
     }
 



Mime
View raw message