A typo in the function MHN_resolve_Mem():
1109 if ((flags & ALL_KINDS) == IS_FIELD) {
1110 THROW_MSG_NULL(vmSymbols::java_lang_NoSuchMethodError(), "field resolution failed");
1111 } else if ((flags & ALL_KINDS) == IS_METHOD ||
1112 (flags & ALL_KINDS) == IS_CONSTRUCTOR) {
1113 THROW_MSG_NULL(vmSymbols::java_lang_NoSuchFieldError(), "method resolution failed");
The NoSuchMethodError is thrown for the IS_FIELD.
The NoSuchFieldError is thrown for the IS_METHOD & IS_CONSTRUCTOR.
The fix should include an appropriate unit test case as it seems this issue is not covered by tests now.
1109 if ((flags & ALL_KINDS) == IS_FIELD) {
1110 THROW_MSG_NULL(vmSymbols::java_lang_NoSuchMethodError(), "field resolution failed");
1111 } else if ((flags & ALL_KINDS) == IS_METHOD ||
1112 (flags & ALL_KINDS) == IS_CONSTRUCTOR) {
1113 THROW_MSG_NULL(vmSymbols::java_lang_NoSuchFieldError(), "method resolution failed");
The NoSuchMethodError is thrown for the IS_FIELD.
The NoSuchFieldError is thrown for the IS_METHOD & IS_CONSTRUCTOR.
The fix should include an appropriate unit test case as it seems this issue is not covered by tests now.
- relates to
-
JDK-8022701 Accessibility checking: InvocationTargetException is thrown instead of IllegalAccessError
-
- Closed
-