changeset 4277:8318d03e1766

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
author jrose
date Wed, 01 Jun 2011 23:56:43 -0700
parents 81f957f86ba5
children 0b8b6eace473
files src/share/classes/java/lang/invoke/MethodHandleNatives.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Fri May 27 19:03:03 2011 -0700
+++ b/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) {