ctubbsii commented on a change in pull request #2021:
URL: https://github.com/apache/accumulo/pull/2021#discussion_r613615346
##########
File path: core/src/main/java/org/apache/accumulo/core/client/admin/FindMax.java
##########
@@ -118,27 +118,26 @@ private static Text _findMax(Scanner scanner, Text start,
boolean inclStart, Tex
Iterator<Entry<Key,Value>> iter = scanner.iterator();
- if (iter.hasNext()) {
- Key next = iter.next().getKey();
+ if (!iter.hasNext()) {
- int count = 0;
- while (count < 10 && iter.hasNext()) {
- next = iter.next().getKey();
- count++;
- }
+ return _findMax(scanner, start, inclStart, mid, mid.equals(start) ?
inclStart : false);
+ }
+ Key next = iter.next().getKey();
Review comment:
Yes, an automated change. It still does what you describe... farther
down. The diff doesn't make it easy to see, but basically, the only change here
is the if condition was negated and the if/else blocks were swapped, in order
to remove an unnecessary `else` keyword. I'm not sold on the advantages of that
particular category of "improvement", and switched the PR back to Draft to
reconsider some of those.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]