[jdk19] RFR: 8290455: jck test api/java_lang/foreign/VaList/Empty.html fails on some platforms
Matthias Baesken
mbaesken at openjdk.org
Fri Jul 22 07:15:30 UTC 2022
On Thu, 21 Jul 2022 12:06:37 GMT, Maurizio Cimadamore <mcimadamore at 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 mbaesken (Reviewer).
-------------
PR: https://git.openjdk.org/jdk19/pull/150
More information about the core-libs-dev
mailing list