Skip to content

Commit

Permalink
Fix repeated iterator generation (apache#10722)
Browse files Browse the repository at this point in the history
### Motivation
Fix repeated iterator generation

(cherry picked from commit e678024)
  • Loading branch information
315157973 authored and eolivelli committed Nov 24, 2021
1 parent 4c83db2 commit 9e4d78a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public boolean contains(long key, long value) {
public Range<T> firstRange() {
Iterator<Range<T>> iterable = set.asRanges().iterator();
if (iterable.hasNext()) {
return set.asRanges().iterator().next();
return iterable.next();
}
return null;
}
Expand Down

0 comments on commit 9e4d78a

Please sign in to comment.