src/jdk/nashorn/internal/objects/NativeJSAdapter.java
Print this page
@@ -732,8 +732,12 @@
public ScriptObject getAdaptee() {
return adaptee;
}
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
- return MH.findStatic(MethodHandles.lookup(), NativeJSAdapter.class, name, MH.type(rtype, types));
+ try {
+ return MethodHandles.lookup().findStatic(NativeJSAdapter.class, name, MH.type(rtype, types));
+ } catch (final NoSuchMethodException | IllegalAccessException e) {
+ throw new AssertionError(e);
+ }
}
}