jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [05/12] jena git commit: toString() inside a transaction.
Date Sat, 18 Nov 2017 09:47:46 GMT
toString() inside a transaction.

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

Branch: refs/heads/master
Commit: b895366750927d9e3e74c7473bebd3365a822f0e
Parents: f030d22
Author: Andy Seaborne <andy@apache.org>
Authored: Wed Nov 15 17:26:01 2017 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Wed Nov 15 17:26:01 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/jena/sparql/core/DatasetGraphWrapper.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/b8953667/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphWrapper.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphWrapper.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphWrapper.java
index 421fdc0..1f1f00b 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphWrapper.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphWrapper.java
@@ -27,6 +27,7 @@ import org.apache.jena.query.ReadWrite ;
 import org.apache.jena.shared.Lock ;
 import org.apache.jena.sparql.SystemARQ ;
 import org.apache.jena.sparql.util.Context ;
+import org.apache.jena.system.Txn;
 
 public class DatasetGraphWrapper implements DatasetGraph, Sync 
 {
@@ -174,7 +175,10 @@ public class DatasetGraphWrapper implements DatasetGraph, Sync
     { getW().close() ; }
     
     @Override
-    public String toString() { return getR().toString() ; }
+    public String toString() {
+        DatasetGraph dsg = getR();
+        return Txn.calculateRead(dsg, ()->dsg.toString() );
+    }
 
     @Override
     public void sync() {


Mime
View raw message