src/jdk/nashorn/internal/runtime/NativeJavaPackage.java
Print this page
@@ -196,11 +196,11 @@
@Override
public GuardedInvocation noSuchProperty(final CallSiteDescriptor desc, final LinkRequest request) {
final String propertyName = desc.getNameToken(2);
final String fullName = name.isEmpty() ? propertyName : name + "." + propertyName;
- final Context context = getContext();
+ final Context context = Context.getContextTrusted();
Class<?> javaClass = null;
try {
javaClass = context.findClass(fullName);
} catch (final NoClassDefFoundError | ClassNotFoundException e) {