jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/4] jena git commit: JENA-1177: Allow null after create. Use mem graph maker as default.
Date Wed, 11 May 2016 13:02:04 GMT
JENA-1177: Allow null after create. Use mem graph maker as default.


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/4c9315fc
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/4c9315fc
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/4c9315fc

Branch: refs/heads/master
Commit: 4c9315fc4afdd30229efa3a3bbe32d03da6adf62
Parents: 009b321
Author: Andy Seaborne <andy@apache.org>
Authored: Wed May 11 13:53:58 2016 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Wed May 11 13:53:58 2016 +0100

----------------------------------------------------------------------
 .../org/apache/jena/sparql/core/DatasetGraphMapLink.java  | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/4c9315fc/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphMapLink.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphMapLink.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphMapLink.java
index e8b35bb..4835aed 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphMapLink.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphMapLink.java
@@ -25,7 +25,6 @@ import java.util.Map ;
 import org.apache.jena.graph.Graph ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.sparql.ARQException ;
 import org.apache.jena.sparql.core.DatasetGraphFactory.GraphMaker ;
 
 /** Implementation of a DatasetGraph as an extensible set of graphs.
@@ -86,7 +85,7 @@ public class DatasetGraphMapLink extends DatasetGraphCollection
      *  but new graphs are created in memory.
      */
     private DatasetGraphMapLink(DatasetGraph dsg) {
-        this(dsg, DatasetGraphFactory.memGraphMaker) ;
+        this(dsg, DatasetGraphFactory.graphMakerMem) ;
     }
 
     private DatasetGraphMapLink(Graph dftGraph, GraphMaker graphMaker) {
@@ -113,7 +112,7 @@ public class DatasetGraphMapLink extends DatasetGraphCollection
      */
     public DatasetGraphMapLink(Graph dftGraph) {
         this.defaultGraph = dftGraph ;
-        this.graphMaker = DatasetGraphFactory.graphMakerNull ;
+        this.graphMaker = DatasetGraphFactory.graphMakerMem ;
     }
 
     // ----
@@ -152,10 +151,7 @@ public class DatasetGraphMapLink extends DatasetGraphCollection
      * Return null for "nothing created as a graph"
      */
     protected Graph getGraphCreate() { 
-        Graph g = graphMaker.create() ;
-        if ( g == null )
-            throw new ARQException("Can't make new graphs") ;
-        return g ;
+        return graphMaker.create() ;
     }
 
     @Override


Mime
View raw message