On Mon, 23 Sep 2024 17:22:02 GMT, Jorn Vernee <[email protected]> wrote:
>> src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java
>> line 225:
>>
>>> 223: // check elements are not all padding layouts and for trailing
>>> padding
>>> 224: private void checkGroup(GroupLayout gl, long maxUnpaddedOffset) {
>>> 225: if (!gl.memberLayouts().isEmpty() &&
>>> gl.memberLayouts().stream().allMatch(e -> e instanceof PaddingLayout)) {
>>
>> You have fixed the javadoc - but the check for `memberLayouts().isEmpty()`
>> is still here?
>
> This seems correct? We don't want to throw an exception for empty layouts.
Whoops - you are right - I misread the condition
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21041#discussion_r1771831479