if this method does not have to account for null node values then

node.isVariable() would suffice.

On Tue, Dec 26, 2017 at 1:46 PM, Claude Warren <[email protected]> wrote:

> 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}
>
> I think that perhaps the if check should  be
>
> if (node instanceof Node_Variable)
>
> As with a lot of this code I am not certain and want to verify before I
> change anything.
>
> Claude
> --
> I like: Like Like - The likeliest place on the web
> <http://like-like.xenei.com>
> LinkedIn: http://www.linkedin.com/in/claudewarren
>



-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Reply via email to