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

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Apr 27 15:17:54 UTC 2021


On Mon, 26 Apr 2021 22:59:10 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.

This pull request has now been integrated.

Changeset: ee1b125c
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.java.net/panama-foreign/commit/ee1b125c
Stats:     37 lines in 3 files changed: 35 ins; 0 del; 2 mod

Clarify IllegalArgumentException on MemorySegment::[spliterator,elements]

Reviewed-by: psandoz

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

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


More information about the panama-dev mailing list