[foreign-memaccess+abi] RFR: Clarify IllegalArgumentException on MemorySegment::[spliterator, elements] [v2]

Paul Sandoz psandoz at openjdk.java.net
Tue Apr 27 14:58:54 UTC 2021


On Tue, 27 Apr 2021 10:31:15 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> In an offline discussion I was made aware that `MemorySegment.spliterator` was not specifying what happened if the size of the layout passed to spliterator() did not match that of the segment.
>> 
>> The newly revised method has a better javadoc, which says a bit more, but stil doesn't specify what happens if the element layout is bigger than the segment.
>> 
>> This small patch rectifies that, and add few tests to check that the implementation issues the expected exceptions.
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address case where elementLayout is zero

Marked as reviewed by psandoz (Committer).

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

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


More information about the panama-dev mailing list