8025962: JSR 292: NoSuchMethodError and NoSuchFieldError in MHN_resolve_Mem
authorvlivanov
Mon, 28 Mar 2016 13:49:34 +0300
changeset 36833 0f6d4a480a96
parent 36832 ead44efe160f
child 36834 fc007081f4f1
8025962: JSR 292: NoSuchMethodError and NoSuchFieldError in MHN_resolve_Mem Reviewed-by: acorn, kvn
hotspot/src/share/vm/prims/methodHandles.cpp
--- 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");
     }