[foreign-jextract] [Rev 01] RFR: 8241504: Expose MemoryLayout annotations/attributes in the public API (foreign-jextract part)

Jorn Vernee jvernee at openjdk.java.net
Thu Mar 26 16:31:28 UTC 2020


On Thu, 26 Mar 2020 15:55:50 GMT, Henry Jen <henryjen at openjdk.org> wrote:

>> Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev
>> excludes the unrelated changes brought in by the merge/rebase.
>
> test/jdk/java/foreign/NativeTestHelper.java line 41:
> 
>> 40:     public static boolean isIntegral(MemoryLayout layout) {
>> 41:         return switch(SystemABI.Type.fromLayout(layout)) {
>> 42:             case BOOL, UNSIGNED_CHAR, SIGNED_CHAR, CHAR, SHORT, UNSIGNED_SHORT,
> 
> Need to catch the exception?

No, I don't think so. The intent is to have a hard failure if the ABI type is missing. The old code was failing more
silently by returning `false`.

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

PR: https://git.openjdk.java.net/panama-foreign/pull/69


More information about the panama-dev mailing list