提交 e1a04c52 编写于 作者: D drchase

8026818: Defmeth failures with -mode invoke

Summary: Added test for IllegalAccessException -> IllegalAccessError path to check if root cause was AbstractMethodError
Reviewed-by: jrose
上级 da3bdef0
......@@ -441,8 +441,13 @@ class MethodHandleNatives {
assert(refKindIsValid(refKind));
return lookup.linkMethodHandleConstant((byte) refKind, defc, name, type);
} catch (IllegalAccessException ex) {
Error err = new IllegalAccessError(ex.getMessage());
throw initCauseFrom(err, ex);
Throwable cause = ex.getCause();
if (cause instanceof AbstractMethodError) {
throw (AbstractMethodError) cause;
} else {
Error err = new IllegalAccessError(ex.getMessage());
throw initCauseFrom(err, ex);
}
} catch (NoSuchMethodException ex) {
Error err = new NoSuchMethodError(ex.getMessage());
throw initCauseFrom(err, ex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册