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 2016/05/11 13:02:06 UTC
[4/4] jena git commit: JENA-1177: Deal with graph not existing
JENA-1177: Deal with graph not existing
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/1d3d2204
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/1d3d2204
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/1d3d2204
Branch: refs/heads/master
Commit: 1d3d2204fe5f7da06144a4c0c25efb88007326da
Parents: e0723fb
Author: Andy Seaborne <an...@apache.org>
Authored: Wed May 11 13:55:25 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed May 11 13:55:25 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/jena/sparql/graph/GraphUnionRead.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/1d3d2204/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphUnionRead.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphUnionRead.java b/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphUnionRead.java
index 4c1dace..13bfb24 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphUnionRead.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphUnionRead.java
@@ -51,10 +51,13 @@ public class GraphUnionRead extends GraphBase
PrefixMapping pmap = new PrefixMappingImpl() ;
for ( Node gn : graphs )
{
- if ( ! gn.isURI() ) continue ;
+ if ( ! gn.isURI() )
+ continue ;
Graph g = dataset.getGraph(gn) ;
- PrefixMapping pmapNamedGraph = g.getPrefixMapping() ;
- pmap.setNsPrefixes(pmapNamedGraph) ;
+ if ( g != null ) {
+ PrefixMapping pmapNamedGraph = g.getPrefixMapping() ;
+ pmap.setNsPrefixes(pmapNamedGraph) ;
+ }
}
return pmap ;
}