7049415: Failure of resolution of sym.reference to the c.s.s. should be wrapped in BootstrapMethodError
authorjrose
Wed, 01 Jun 2011 23:56:43 -0700
changeset 9779 e3a8fbcb21fb
parent 9753 43aa07d93e7f
child 9780 6fc3b49cfee4
7049415: Failure of resolution of sym.reference to the c.s.s. should be wrapped in BootstrapMethodError Summary: Wrap invokedynamic linkage errors in BootstrapMethodError, as needed. Reviewed-by: never
jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Fri May 27 19:03:03 2011 -0700
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Wed Jun 01 23:56:43 2011 -0700
@@ -359,6 +359,12 @@
             required = Object[].class;  // should have been an array
             code = 192; // checkcast
             break;
+        case 191: // athrow
+            // JVM is asking us to wrap an exception which happened during resolving
+            if (required == BootstrapMethodError.class) {
+                throw new BootstrapMethodError((Throwable) actual);
+            }
+            break;
         }
         // disregard the identity of the actual object, if it is not a class:
         if (message == null) {