jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r544319 - /jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
Date Mon, 04 Jun 2007 22:49:04 GMT
Author: jukka
Date: Mon Jun  4 15:49:03 2007
New Revision: 544319

URL: http://svn.apache.org/viewvc?view=rev&rev=544319
Log:
1.3: Merged revision 544315 (JCR-385)

Modified:
    jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java

Modified: jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java?view=diff&rev=544319&r1=544318&r2=544319
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
(original)
+++ jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
Mon Jun  4 15:49:03 2007
@@ -335,7 +335,12 @@
                 break;
             case JJTROOT:
             case JJTROOTDESCENDANTS:
-                ((PathQueryNode) queryNode).setAbsolute(true);
+                if (queryNode instanceof PathQueryNode) {
+                    ((PathQueryNode) queryNode).setAbsolute(true);
+                } else {
+                    exceptions.add(new InvalidQueryException(
+                            "Unsupported root level query node: " + queryNode));
+                }
                 break;
             case JJTSTEPEXPR:
                 if (isAttributeAxis(node)) {



Mime
View raw message