Skip to content

Commit

Permalink
Initialize with -1 to avoid hitting the sizing issue (#3020)
Browse files Browse the repository at this point in the history
  • Loading branch information
tishun authored Oct 18, 2024
1 parent f467212 commit aec0887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/ScanIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ private ScoredValueScanCursor<V> getNextScanCursor(ScanCursor scanCursor) {
* @return a {@link Stream} for this {@link ScanIterator}.
*/
public Stream<T> stream() {
return StreamSupport.stream(Spliterators.spliterator(this, 0, 0), false);
return StreamSupport.stream(Spliterators.spliterator(this, -1, 0), false);
}

/**
Expand Down

0 comments on commit aec0887

Please sign in to comment.