This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/master by this push:
     new c5ecd47  Rename yield method (future restricted identifier)
c5ecd47 is described below

commit c5ecd474dbed016cc6653870fedcce863550a44f
Author: Christopher Tubbs <ctubb...@apache.org>
AuthorDate: Thu Apr 9 01:50:30 2020 -0400

    Rename yield method (future restricted identifier)
    
    Rename a private yield method in SourceSwitchingIteratorTest to avoid
    conflicting with future versions of Java. In future Java releases,
    'yield' is a restricted keyword.
    
    Verified failure (and fix) using the following on OpenJDK13:
    
    ```
    mvn clean package -DskipTests -Dmaven.compiler.failOnWarning=true
    ```
---
 .../core/iterators/system/SourceSwitchingIteratorTest.java     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/core/src/test/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIteratorTest.java
 
b/core/src/test/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIteratorTest.java
index 5cbecdc..2bfcfce 100644
--- 
a/core/src/test/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIteratorTest.java
+++ 
b/core/src/test/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIteratorTest.java
@@ -294,7 +294,7 @@ public class SourceSwitchingIteratorTest {
 
   }
 
-  private Range yield(Range r, SourceSwitchingIterator ssi, YieldCallback<Key> 
yield)
+  private Range doYield(Range r, SourceSwitchingIterator ssi, 
YieldCallback<Key> yield)
       throws IOException {
     while (yield.hasYielded()) {
       Key yieldPosition = yield.getPositionAndReset();
@@ -325,13 +325,13 @@ public class SourceSwitchingIteratorTest {
 
     Range r = new Range();
     ssi.seek(r, new ArrayList<>(), false);
-    r = yield(r, ssi, yield);
+    r = doYield(r, ssi, yield);
     testAndCallNext(ssi, "r1", "cf1", "cq1", 5, "v1", true);
-    r = yield(r, ssi, yield);
+    r = doYield(r, ssi, yield);
     testAndCallNext(ssi, "r1", "cf1", "cq3", 5, "v2", true);
-    r = yield(r, ssi, yield);
+    r = doYield(r, ssi, yield);
     testAndCallNext(ssi, "r2", "cf1", "cq1", 5, "v3", true);
-    r = yield(r, ssi, yield);
+    r = doYield(r, ssi, yield);
     assertFalse(ssi.hasTop());
   }
 

Reply via email to