You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Claude Warren (JIRA)" <ji...@apache.org> on 2017/12/26 23:11:00 UTC

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

Claude Warren created JENA-1455:
-----------------------------------

             Summary: 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)