-
Bug
-
Resolution: Duplicate
-
P3
-
22
1. https://download.java.net/java/early_access/jdk22/docs/api/java.base/java/lang/foreign/MemorySegment.html#set(java.lang.foreign.AddressLayout,long,java.lang.foreign.MemorySegment)
2. https://download.java.net/java/early_access/jdk22/docs/api/java.base/java/lang/foreign/MemorySegment.html#setAtIndex(java.lang.foreign.ValueLayout.OfChar,long,char)
3. https://download.java.net/java/early_access/jdk22/docs/api/java.base/java/lang/foreign/MemorySegment.html#setAtIndex(java.lang.foreign.AddressLayout,long,java.lang.foreign.MemorySegment)
The above API doc reads:
UnsupportedOperationException - if this segment is read-only
Should be:
IllegalArgumentException - if this segment is read-only
As in: https://download.java.net/java/early_access/jdk22/docs/api/java.base/java/lang/foreign/MemorySegment.html#setAtIndex(java.lang.foreign.ValueLayout.OfByte,long,byte)
1 & 3 also records:
IllegalArgumentException - if this segment is read-only
2. https://download.java.net/java/early_access/jdk22/docs/api/java.base/java/lang/foreign/MemorySegment.html#setAtIndex(java.lang.foreign.ValueLayout.OfChar,long,char)
3. https://download.java.net/java/early_access/jdk22/docs/api/java.base/java/lang/foreign/MemorySegment.html#setAtIndex(java.lang.foreign.AddressLayout,long,java.lang.foreign.MemorySegment)
The above API doc reads:
UnsupportedOperationException - if this segment is read-only
Should be:
IllegalArgumentException - if this segment is read-only
As in: https://download.java.net/java/early_access/jdk22/docs/api/java.base/java/lang/foreign/MemorySegment.html#setAtIndex(java.lang.foreign.ValueLayout.OfByte,long,byte)
1 & 3 also records:
IllegalArgumentException - if this segment is read-only
- duplicates
-
JDK-8321786 SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario
- Resolved