Fixes #8: ensure array is always large enough

This commit is contained in:
Andy Clement
2013-05-29 07:59:47 -07:00
parent 475d1caf0c
commit feaf6b4a8c

View File

@@ -80,7 +80,7 @@ public class NameRegistry {
int id = getIdFor(slashedClassName);
if (id == -1) {
id = nextTypeId++;
if (id >= allocatedIds.length) {
if (nextTypeId >= allocatedIds.length) {
size = size + 10;
// need to make more room
String[] newAllocatedIds = new String[size];