jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [3/3] jena git commit: Protect clean up code in end() for multiple calls.
Date Thu, 03 Dec 2015 22:07:36 GMT
Protect clean up code in end() for multiple calls.

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

Branch: refs/heads/master
Commit: 83cf64d7800c19c2553a68924ce0900ebe95a76a
Parents: 4b0b92b
Author: Andy Seaborne <andy@apache.org>
Authored: Thu Dec 3 22:06:59 2015 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Thu Dec 3 22:06:59 2015 +0000

----------------------------------------------------------------------
 .../java/org/apache/jena/sparql/core/mem/DatasetGraphInMemory.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/83cf64d7/jena-arq/src/main/java/org/apache/jena/sparql/core/mem/DatasetGraphInMemory.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/mem/DatasetGraphInMemory.java
b/jena-arq/src/main/java/org/apache/jena/sparql/core/mem/DatasetGraphInMemory.java
index ad7e4ff..150bf24 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/mem/DatasetGraphInMemory.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/mem/DatasetGraphInMemory.java
@@ -166,6 +166,8 @@ public class DatasetGraphInMemory extends DatasetGraphTriplesQuads implements
Tr
 
 	@Override
 	public void end() {
+	    if ( !isInTransaction() )
+	        return ;
 		quadsIndex().end();
 		defaultGraph().end();
 		isInTransaction(false);


Mime
View raw message