On Thu, 21 Jul 2022 12:06:37 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
> The javadoc for `Linker` states that some operations throw > `UnsupportedOperationException` when called on an unsupported platform. These > operations are: > > * `Linker::nativeLinker` > * `VaList::empty` > * `VaList::make` > * `VaList::ofAddress` > > While the code throws an UOE as required, since the exception is thrown in a > static initialized, it gets wrapped in an `ExceptionInInitializerError`. > > The solution is to set the `CABI` value to `null` if the platform is unknown. > Then, when clients call the `CABI.current()` method, we can throw at that > point, which will result in the behavior requested by the API spec. Marked as reviewed by jvernee (Reviewer). ------------- PR: https://git.openjdk.org/jdk19/pull/150