[jdk22] RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario
Per Minborg
pminborg at openjdk.org
Wed Jan 10 14:57:24 UTC 2024
On Tue, 9 Jan 2024 17:11:42 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario
>
> src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 1944:
>
>> 1942: * in the provided layout
>> 1943: * @throws IndexOutOfBoundsException if {@code offset > byteSize() - layout.byteSize()}
>> 1944: * or {@code offset < 0}
>
> Why is UOE being removed here (and elsewhere) ?
This one is redundant and there is an IAE covering the same case a bit down.
-------------
PR Review Comment: https://git.openjdk.org/jdk22/pull/42#discussion_r1447497781
More information about the core-libs-dev
mailing list