diff src/share/vm/prims/methodHandles.cpp @ 6224:56c4f88474b3

7087357: JSR 292: remove obsolete code after 7085860 Reviewed-by: kvn, never
author twisti
date Mon, 16 Jul 2012 11:14:41 -0700
parents 15d394228cfa
children 1d7922586cf6
line wrap: on
line diff
--- a/src/share/vm/prims/methodHandles.cpp	Fri Jul 13 17:48:26 2012 -0700
+++ b/src/share/vm/prims/methodHandles.cpp	Mon Jul 16 11:14:41 2012 -0700
@@ -3180,17 +3180,15 @@
       jclass MH_class = env->FindClass(MH_name);
       status = env->RegisterNatives(MH_class, invoke_methods, sizeof(invoke_methods)/sizeof(JNINativeMethod));
     }
+    if (!env->ExceptionOccurred()) {
+      status = env->RegisterNatives(MHN_class, call_site_methods, sizeof(call_site_methods)/sizeof(JNINativeMethod));
+    }
     if (env->ExceptionOccurred()) {
       warning("JSR 292 method handle code is mismatched to this JVM.  Disabling support.");
       enable_MH = false;
       env->ExceptionClear();
     }
 
-    status = env->RegisterNatives(MHN_class, call_site_methods, sizeof(call_site_methods)/sizeof(JNINativeMethod));
-    if (env->ExceptionOccurred()) {
-      // Exception is okay until 7087357
-      env->ExceptionClear();
-    }
   }
 
   if (enable_MH) {