jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r633519 - /jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/QueryObjectModelTree.java
Date Tue, 04 Mar 2008 15:48:01 GMT
Author: mreutegg
Date: Tue Mar  4 07:48:00 2008
New Revision: 633519

URL: http://svn.apache.org/viewvc?rev=633519&view=rev
Log:
JCR-1104: JSR 283 support
- check for duplicate selector name

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/QueryObjectModelTree.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/QueryObjectModelTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/QueryObjectModelTree.java?rev=633519&r1=633518&r2=633519&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/QueryObjectModelTree.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/QueryObjectModelTree.java
Tue Mar  4 07:48:00 2008
@@ -69,7 +69,10 @@
         this.columns = columns;
         for (Iterator it = Arrays.asList(source.getSelectors()).iterator(); it.hasNext();
) {
             SelectorImpl selector = (SelectorImpl) it.next();
-            selectors.put(selector.getSelectorQName(), selector);
+            if (selectors.put(selector.getSelectorQName(), selector) != null) {
+                throw new InvalidQueryException("Duplicate selector name: " +
+                        selector.getSelectorName());
+            }
         }
         if (selectors.size() == 1) {
             // there is only one selector, which is also a default selector



Mime
View raw message