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
--- 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) {