jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1412514 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java
Date Thu, 22 Nov 2012 12:04:54 GMT
Author: thomasm
Date: Thu Nov 22 12:04:53 2012
New Revision: 1412514

URL: http://svn.apache.org/viewvc?rev=1412514&view=rev
Log:
JCR-3460 PropertyIndex uses TraversingCursor but should not

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java?rev=1412514&r1=1412513&r2=1412514&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java
Thu Nov 22 12:04:53 2012
@@ -67,7 +67,8 @@ class NodeTypeIndex implements QueryInde
     public Cursor query(Filter filter, NodeState root) {
         NodeTypeIndexLookup lookup = new NodeTypeIndexLookup(root);
         if (!hasNodeTypeRestriction(filter) || !lookup.isIndexed(filter.getPath())) {
-            return Cursors.newTraversingCursor(filter, root);
+            throw new IllegalStateException(
+                    "NodeType index is used even when no index is available for filter "
+ filter);
         }
         return Cursors.newPathCursor(lookup.find(
                 resolveNodeType(root, filter.getNodeType())));



Mime
View raw message