[
https://issues.apache.org/jira/browse/JENA-1455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17803208#comment-17803208
]
Andy Seaborne commented on JENA-1455:
-------------------------------------
This seems to have been fixed as part of JENA-1456.
> QueryBuilder allows Node_Variable instances into QueryTripleIterator
> --------------------------------------------------------------------
>
> Key: JENA-1455
> URL: https://issues.apache.org/jira/browse/JENA-1455
> Project: Apache Jena
> Issue Type: Bug
> Components: QueryBuilder
> Affects Versions: Jena 3.6.0
> Reporter: Claude Warren
> Assignee: Claude Warren
> Priority: Minor
> Fix For: Jena 3.7.0
>
>
> 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.
> {noformat}
> 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 ;
> }
> {noformat}
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]