You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IntList list = new IntArrayList();
list.add(1);
list.add(2);
list.add(3);
list = new IntImmutableList(list);
IntList subList = list.subList(1, 3);
for (int i : subList) {
System.out.println("i = " + i);
}
gives:
i = 2
i = 3
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
at it.unimi.dsi.fastutil.ints.IntImmutableList$ImmutableSubList$1.nextInt(IntImmutableList.java:483)
at it.unimi.dsi.fastutil.ints.IntIterator.next(IntIterator.java:46)
at it.unimi.dsi.fastutil.ints.IntListIterator.next(IntListIterator.java:103)
at it.unimi.dsi.fastutil.ints.IntListIterator.next(IntListIterator.java:31)
The text was updated successfully, but these errors were encountered:
Version 8.5.12
How to reproduce:
gives:
The text was updated successfully, but these errors were encountered: