You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/12/27 08:21:00 UTC

[jira] [Commented] (JENA-1455) QueryBuilder allows Node_Variable instances into QueryTripleIterator

    [ https://issues.apache.org/jira/browse/JENA-1455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16304343#comment-16304343 ] 

ASF subversion and git services commented on JENA-1455:
-------------------------------------------------------

Commit 5e6c047e2fb83609191c2b7c15fa9103fb7cc08b in jena's branch refs/heads/master from [~claude@xenei.org]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=5e6c047 ]

fixes for JENA-1455 and JENA-1456

also minor fixes for JENA-1368

> 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
>
> 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
(v6.4.14#64029)