On Tue, 9 Jan 2024 17:11:42 GMT, Maurizio Cimadamore <mcimadam...@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