RFR 8163553 java.lang.LinkageError from test java/lang/ThreadGroup/Stop.java
paul.sandoz at oracle.com
Tue Oct 18 18:41:30 UTC 2016
This is the issue that motivated a change in the behaviour of indy wrapping Errors in BootstrapMethodError, JDK-8166974. I plan to push this issue with JDK-8166974 to hs, since they are related in behaviour even though there is no direct dependency between the patches.
When invoking signature-polymorphic methods a similar but hardcoded dance occurs, with an appeal to Java code, to link the call site.
- MethodHandle.invoke/invokeExact (and the VH methods) would wrap all Errors in LinkageError. Now they are passed through, thus an Error like ThreadDeath is not wrapped.
- MethodHandle.invoke/invokeExact/invokeBasic throw Throwable, and in certain cases the Throwable is wrapped in an InternalError. In many other cases Error and RuntimeException are propagated, which i think in general is the right pattern, so i consistently applied that.
- I updated StringConcatFactory to also pass through Errors and avoid unduly wrapping StringConcatException in another instance of StringConcatException. (LambdaMetafactory and associated classes required no changes.)
More information about the core-libs-dev