changeset 5200:5001d047e6ac

8023004: JSR 292: java.lang.RuntimeException: Original target method was called. Reviewed-by: jrose Contributed-by: vladimir.ivanov@oracle.com, serguei.spitsyn@oracle.com
author sspitsyn
date Wed, 12 Feb 2014 03:57:09 -0800
parents ec4a087088bf
children 092aa7bb9868
files src/share/vm/prims/methodHandles.cpp
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/methodHandles.cpp	Fri Feb 07 16:12:22 2014 -0800
+++ b/src/share/vm/prims/methodHandles.cpp	Wed Feb 12 03:57:09 2014 -0800
@@ -1260,11 +1260,12 @@
   } else if (vmtarget->is_klass()) {
     x = Klass::cast((klassOop) vmtarget())->java_mirror();
   } else {
-    Handle mname2 = MethodHandles::new_MemberName(CHECK_NULL);
-    if (vmtarget->is_method())
-      x = MethodHandles::init_method_MemberName(mname2, methodOop(vmtarget()), false, KlassHandle());
-    else
+    if (vmtarget->is_method()) {
+      x = mname();
+    } else {
+      Handle mname2 = MethodHandles::new_MemberName(CHECK_NULL);
       x = MethodHandles::init_MemberName(mname2(), vmtarget());
+    }
   }
   result->obj_at_put(1, x);
   return JNIHandles::make_local(env, result());