Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Jena 3.6.0
-
None
Description
Using Node_Variable instances in Quads and Triples to to methods results in Node_Variable instances appearing in the QueryTripleIterator.
QueryTripleIterator at line 87 calls Var.isVar(node) which throws an exception if the node is a Node_Variable. But based code following line 87 I think that Node_Variable should be accepted.
private static Node substitute(Node node, Binding binding) { if ( Var.isVar(node) ) // <---- line 87 { Node x = binding.get(Var.alloc(node)) ; if ( x != null ) return x ; } return node ; }
QueryTripleIterator is internal code and is only expecting Var instances. The solution is to fix the QueryBuilder code so that it only produces Var in the queries resulting from a build() execution.