var iterator = IntList.of(1, 1).subList(1, 2).iterator();
while (iterator.hasNext()) iterator.nextInt();
throws java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2.
It's reproducible with DoubleList as well. Haven't checked other types though.
Possible workaround: replace IntList with IntArrayList.
Affected version: fastutil-core:8.5.12.
I guess, the problem is in missing addition of from inside hasNext method.
Example:
throws
java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2
. It's reproducible with DoubleList as well. Haven't checked other types though.Possible workaround: replace
IntList
withIntArrayList
.Affected version:
fastutil-core:8.5.12
.I guess, the problem is in missing addition of
from
insidehasNext
method.