[foreign-memaccess+abi] RFR: Clarify IllegalArgumentException on MemorySegment::[spliterator, elements]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Mon Apr 26 23:04:59 UTC 2021
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.
-------------
Commit messages:
- Clarify IllegalArgumentException on MemorySegment::[spliterator,elements]
Changes: https://git.openjdk.java.net/panama-foreign/pull/522/files
Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=522&range=00
Stats: 24 lines in 2 files changed: 22 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/522.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/522/head:pull/522
PR: https://git.openjdk.java.net/panama-foreign/pull/522
More information about the panama-dev
mailing list