jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [4/5] jena git commit: Choose transactional properly.
Date Sat, 06 Feb 2016 18:22:00 GMT
Choose transactional properly.

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

Branch: refs/heads/master
Commit: 11f1a1d339429a455b355964d3b135bb0c38f9b0
Parents: 1822e29
Author: Andy Seaborne <andy@apache.org>
Authored: Sat Feb 6 18:08:31 2016 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Sat Feb 6 18:08:31 2016 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/jena/sparql/core/DatasetImpl.java   | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/11f1a1d3/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
index bdbbf60..a8cf3f7 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
@@ -48,18 +48,16 @@ public class DatasetImpl implements Dataset
 
     /** Wrap an existing DatasetGraph */
     public static Dataset wrap(DatasetGraph datasetGraph) {
-        DatasetImpl ds = new DatasetImpl(datasetGraph) ;
-        return ds ;
+        return new DatasetImpl(datasetGraph) ;
     }
     
     protected DatasetImpl(DatasetGraph dsg) {
-        this(dsg, dsg);
+        this(dsg,  (dsg.supportsTransactions() ? dsg : null)) ; 
     }
 
     protected DatasetImpl(DatasetGraph dsg, Transactional transactional) {
         this.dsg = dsg;
-        this.transactional = 
-            ( transactional instanceof TransactionalNotSupported ) ? null : transactional
; 
+        this.transactional = transactional ; 
     }
     
     /** Create a Dataset with the model as default model.


Mime
View raw message