Skip to content

Commit

Permalink
Check that !includeHeads.isEmpty in OrIterator before trying to refer…
Browse files Browse the repository at this point in the history
…ence the first element
  • Loading branch information
billoley committed Oct 25, 2023
1 parent 5309d31 commit c99c818
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void initialize() {
next();
} catch (WaitWindowOverrunException e) {
// if prev != null then it's a match that has not been returned
T lowest = includeHeads.keySet().first();
T lowest = includeHeads.isEmpty() ? null : includeHeads.keySet().first();
Key possibleYieldKey = null;
if (prev != null || lowest != null) {
possibleYieldKey = (prev != null) ? (Key) prev : (Key) lowest;
Expand Down

0 comments on commit c99c818

Please sign in to comment.