You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/07/30 19:42:07 UTC
svn commit: r1367190 -
/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterGraph.java
Author: andy
Date: Mon Jul 30 17:42:07 2012
New Revision: 1367190
URL: http://svn.apache.org/viewvc?rev=1367190&view=rev
Log:
JENA-288
Fix for known not-to-exist graph and a constrained variable.
Modified:
jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterGraph.java
Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterGraph.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterGraph.java?rev=1367190&r1=1367189&r2=1367190&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterGraph.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterGraph.java Mon Jul 30 17:42:07 2012
@@ -153,6 +153,10 @@ public class QueryIterGraph extends Quer
Node gn = graphNames.next() ;
QueryIterator qIter = buildIterator(parentBinding, gn, opGraph, getExecContext()) ;
+ if ( qIter == null )
+ // Know to be nothing (e.g. graph does not exist).
+ return null ;
+
if ( Var.isVar(opGraph.getNode()) )
{
// This is the join of the graph node variable to the sub-pattern solution.
@@ -165,7 +169,7 @@ public class QueryIterGraph extends Quer
return qIter ;
}
-
+ // Create the iterator - or return null if there can't be any results.
protected static QueryIterator buildIterator(Binding binding, Node graphNode, OpGraph opGraph, ExecutionContext outerCxt)
{
if ( !graphNode.isURI() )