8278144: Javadoc for MemorySegment::set/MemorySegment::setAtIndex is missing throws tag

Reviewed-by: sundar
This commit is contained in:
Maurizio Cimadamore 2021-12-03 13:23:36 +00:00
parent ba2a8e5a49
commit 3f28a21414

View File

@ -651,6 +651,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* @throws IllegalArgumentException if the size of the native string is greater than the largest string supported by the platform.
* @throws IllegalStateException if the size of the native string is greater than the size of this segment,
* or if the scope associated with this segment has been closed, or if access occurs from a thread other than the thread owning that scope.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
default void setUtf8String(long offset, String str) {
Utils.toCString(str.getBytes(StandardCharsets.UTF_8), SegmentAllocator.prefixAllocator(asSlice(offset)));
@ -1052,6 +1053,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void set(ValueLayout.OfByte layout, long offset, byte value) {
@ -1086,6 +1088,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void set(ValueLayout.OfBoolean layout, long offset, boolean value) {
@ -1120,6 +1123,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void set(ValueLayout.OfChar layout, long offset, char value) {
@ -1154,6 +1158,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void set(ValueLayout.OfShort layout, long offset, short value) {
@ -1188,6 +1193,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void set(ValueLayout.OfInt layout, long offset, int value) {
@ -1222,6 +1228,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void set(ValueLayout.OfFloat layout, long offset, float value) {
@ -1256,6 +1263,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void set(ValueLayout.OfLong layout, long offset, long value) {
@ -1290,6 +1298,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void set(ValueLayout.OfDouble layout, long offset, double value) {
@ -1324,6 +1333,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void set(ValueLayout.OfAddress layout, long offset, Addressable value) {
@ -1358,6 +1368,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void setAtIndex(ValueLayout.OfChar layout, long index, char value) {
@ -1392,6 +1403,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void setAtIndex(ValueLayout.OfShort layout, long index, short value) {
@ -1426,6 +1438,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void setAtIndex(ValueLayout.OfInt layout, long index, int value) {
@ -1460,6 +1473,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void setAtIndex(ValueLayout.OfFloat layout, long index, float value) {
@ -1494,6 +1508,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void setAtIndex(ValueLayout.OfLong layout, long index, long value) {
@ -1528,6 +1543,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void setAtIndex(ValueLayout.OfDouble layout, long index, double value) {
@ -1562,6 +1578,7 @@ for (long l = 0; l < segment.byteSize(); l++) {
* a thread other than the thread owning that scope.
* @throws IndexOutOfBoundsException when the dereference operation falls outside the <em>spatial bounds</em> of the
* memory segment.
* @throws UnsupportedOperationException if this segment is {@linkplain #isReadOnly() read-only}.
*/
@ForceInline
default void setAtIndex(ValueLayout.OfAddress layout, long index, Addressable value) {