int length = ScriptRuntime.toInt32(d);
if (length != d) {
String msg = ScriptRuntime.getMessage0("msg.arraylength.bad");
throw ScriptRuntime.constructError("RangeError", msg);
}
List list = ((List) javaObject);
int size = list.size();
if (length < size) {
list.remove(length, size);
} else {
for (int i = size; i < length; i++)
list.add(null);
}
} else if (javaObject instanceof StringIndexList
&& !members.has(name, false)) {
((StringIndexList) javaObject).put(name, coerceComponentType(value));
return;