You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2020/07/16 17:07:28 UTC
[accumulo] 01/02: Rename yield method (future restricted identifier)
This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch 1.9
in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit ac479ba611fe33c3d7962ad51ad376f002b4f8e3
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Thu Jul 16 00:58:16 2020 -0400
Rename yield method (future restricted identifier)
(Backport of c5ecd474dbed016cc6653870fedcce863550a44f)
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 56dde11..2b43bea 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
@@ -293,7 +293,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();
@@ -324,13 +324,13 @@ public class SourceSwitchingIteratorTest {
Range r = new Range();
ssi.seek(r, new ArrayList<ByteSequence>(), 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());
}