[jdk19] Integrated: 8290455: jck test api/java_lang/foreign/VaList/Empty.html fails on some platforms

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Jul 25 21:37:21 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.

This pull request has now been integrated.

Changeset: 8c9d5ad4
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.org/jdk19/commit/8c9d5ad4f89e7af18f4ee3b8f236083491d7f6fa
Stats:     89 lines in 3 files changed: 67 ins; 7 del; 15 mod

8290455: jck test api/java_lang/foreign/VaList/Empty.html fails on some platforms

Reviewed-by: jvernee, mbaesken

-------------

PR: https://git.openjdk.org/jdk19/pull/150


More information about the core-libs-dev mailing list