8025962: JSR 292: NoSuchMethodError and NoSuchFieldError in MHN_resolve_Mem
Reviewed-by: acorn, kvn
--- a/hotspot/src/share/vm/prims/methodHandles.cpp Mon Mar 28 13:49:34 2016 +0300
+++ b/hotspot/src/share/vm/prims/methodHandles.cpp Mon Mar 28 13:49:34 2016 +0300
@@ -1228,10 +1228,10 @@
THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "obsolete MemberName format");
}
if ((flags & ALL_KINDS) == IS_FIELD) {
- THROW_MSG_NULL(vmSymbols::java_lang_NoSuchMethodError(), "field resolution failed");
+ THROW_MSG_NULL(vmSymbols::java_lang_NoSuchFieldError(), "field resolution failed");
} else if ((flags & ALL_KINDS) == IS_METHOD ||
(flags & ALL_KINDS) == IS_CONSTRUCTOR) {
- THROW_MSG_NULL(vmSymbols::java_lang_NoSuchFieldError(), "method resolution failed");
+ THROW_MSG_NULL(vmSymbols::java_lang_NoSuchMethodError(), "method resolution failed");
} else {
THROW_MSG_NULL(vmSymbols::java_lang_LinkageError(), "resolution failed");
}