Fixes issue #1929, with insert method in IntList and FloatList.

This commit is contained in:
Dhruv Jawali
2013-06-30 21:46:41 +02:00
parent 2b0b1a1e0a
commit 2ad8797198
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -301,7 +301,7 @@ public class FloatList implements Iterable<Float> {
if (index < 0) {
throw new IllegalArgumentException("insert() index cannot be negative: it was " + index);
}
if (index >= values.length) {
if (index >= data.length) {
throw new IllegalArgumentException("insert() index " + index + " is past the end of this list");
}
@@ -720,4 +720,4 @@ public class FloatList implements Iterable<Float> {
sb.append(" ]");
return sb.toString();
}
}
}
+2 -2
View File
@@ -255,7 +255,7 @@ public class IntList implements Iterable<Integer> {
if (index < 0) {
throw new IllegalArgumentException("insert() index cannot be negative: it was " + index);
}
if (index >= values.length) {
if (index >= data.length) {
throw new IllegalArgumentException("insert() index " + index + " is past the end of this list");
}
@@ -725,4 +725,4 @@ public class IntList implements Iterable<Integer> {
sb.append(" ]");
return sb.toString();
}
}
}