Skip to content

Commit aec0887

Browse files
authored
Initialize with -1 to avoid hitting the sizing issue (#3020)
1 parent f467212 commit aec0887

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/io/lettuce/core/ScanIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ private ScoredValueScanCursor<V> getNextScanCursor(ScanCursor scanCursor) {
341341
* @return a {@link Stream} for this {@link ScanIterator}.
342342
*/
343343
public Stream<T> stream() {
344-
return StreamSupport.stream(Spliterators.spliterator(this, 0, 0), false);
344+
return StreamSupport.stream(Spliterators.spliterator(this, -1, 0), false);
345345
}
346346

347347
/**

0 commit comments

Comments
 (0)