-
Bug
-
Resolution: Unresolved
-
P4
-
8, 9, 11, 17, 21, 25
if the bootstrap method of an invokedynamic throws an instance of a user-defined LinkageError subclass, the following happens:
* `java.lang.invoke.CallSite#makeSite` lets that through directly (it doesn't wrap `java.lang.Error` instances)
* since it's an instance of LinkageError, it gets saved as a resolution error in the constant pool & resolution error table
* it's then rethrown at the invokedynamic that triggered this resolution
* the next time this invokedynamic is executed, the VM tries to throw the saved resolution error
* it tries to locate the exception type in the boot class loader but fails. leading to a NoClassDefFoundError
According to JVMS § 5.4.3:
> Subsequent attempts by the same instruction in the class file to resolve the symbolic reference always fail with the same error that was thrown as a result of the initial resolution attempt.
* `java.lang.invoke.CallSite#makeSite` lets that through directly (it doesn't wrap `java.lang.Error` instances)
* since it's an instance of LinkageError, it gets saved as a resolution error in the constant pool & resolution error table
* it's then rethrown at the invokedynamic that triggered this resolution
* the next time this invokedynamic is executed, the VM tries to throw the saved resolution error
* it tries to locate the exception type in the boot class loader but fails. leading to a NoClassDefFoundError
According to JVMS § 5.4.3:
> Subsequent attempts by the same instruction in the class file to resolve the symbolic reference always fail with the same error that was thrown as a result of the initial resolution attempt.