src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java
Print this page
@@ -1999,16 +1999,15 @@
final FindProperty find = findProperty(name, true);
MethodHandle mh;
if (find == null) {
switch (operator) {
+ case "getElem": // getElem only gets here if element name is constant, so treat it like a property access
case "getProp":
return noSuchProperty(desc, request);
case "getMethod":
return noSuchMethod(desc, request);
- case "getElem":
- return createEmptyGetter(desc, explicitInstanceOfCheck, name);
default:
throw new AssertionError(operator); // never invoked with any other operation
}
}