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/09/05 12:29:45 UTC

[09/10] jena git commit: JENA-1229: Provide package visible accessor for tests.

JENA-1229: Provide package visible accessor for tests.

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

Branch: refs/heads/master
Commit: 0aff0e6d42404e62c87a8fc0b0b8086fe00a7cd3
Parents: 1c39de9
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Sep 5 13:21:51 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Sep 5 13:21:51 2016 +0100

----------------------------------------------------------------------
 .../jena/sparql/engine/iterator/QueryIteratorBase.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/0aff0e6d/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIteratorBase.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIteratorBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIteratorBase.java
index 7c1f836..6401f11 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIteratorBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIteratorBase.java
@@ -52,11 +52,7 @@ public abstract class QueryIteratorBase
     // ONLY the requestingCancel variable needs to be volatile. The abortIterator is guaranteed to 
     // be visible because it is written to before requestingCancel, and read from after.
 
-    /** 
-        In the process of requesting a cancel, or one has been done.
-        `protected` to allow tests to read it.
-    */  
-    protected volatile boolean requestingCancel = false;
+    private volatile boolean requestingCancel = false;
 
     /* If set, any hasNext/next throws QueryAbortedException
      * In normal operation, this is the same setting as requestingCancel.
@@ -90,6 +86,10 @@ public abstract class QueryIteratorBase
     /** Propagates the cancellation request - called asynchronously with the iterator itself */
     protected abstract void requestCancel();
     
+    /* package */ boolean getRequestingCancel() {
+        return requestingCancel ;
+    }
+    
     // -------- The contract with the subclasses 
 
     protected boolean isFinished() { return finished ; }