Merge pull request #2672 from aengelke/string-list-insert-fix

Fix insert bug in StringList
This commit is contained in:
Ben Fry
2014-07-30 12:39:34 -04:00

View File

@@ -312,7 +312,7 @@ public class StringList implements Iterable<String> {
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");
}