-
Bug
-
Resolution: Done
-
Blocker
-
4.0.0.Beta1
-
None
-
https://github.com/ModeShape/modeshape/pull/1236, https://github.com/ModeShape/modeshape/pull/1237, https://github.com/ModeShape/modeshape/pull/1244, https://github.com/ModeShape/modeshape/pull/1249, https://github.com/ModeShape/modeshape/pull/1252, https://github.com/ModeShape/modeshape/pull/1253, https://github.com/ModeShape/modeshape/pull/1254
If I fire the query below and then loop over the resultset using NodeIterator.hasnext() / NodeIterator.nextNode(), I get a java.util.NoSuchElementException at org.modeshape.jcr.query.NodeSequence$SingleWidthBatch.getNode(NodeSequence.java:1979)
at org.modeshape.jcr.query.JcrQueryResult$QueryResultNodeIterator.nextNode(JcrQueryResult.java:292)
Edit: same happens if using UNION, INTERSECT works in this case but only because it returns an empty resultset. So I guess it always happens on non empty set
Code used to loop:
NodeIterator nodeIterator = query.execute().getNodes()
while (nodeIterator.hasNext()) {
nodeIterator.nextNode();
}
Query code:
SELECT BASE.* from [nt:unstructured] as BASE JOIN [nt:unstructured] AS REF ON ISCHILDNODE(BASE,REF) JOIN [nt:unstructured] AS REF2 ON REF2.[jcr:uuid] = REF.[jcr:uuid] INTERSECT SELECT BASE.* from [nt:unstructured] as BASE JOIN [nt:unstructured] AS REF ON REF.[jcr:uuid] = BASE.[jcr:uuid]