diff --git a/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java b/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java index e688d46357d04..241cea672e01a 100644 --- a/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java +++ b/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java @@ -572,7 +572,7 @@ public sealed interface MemoryLayout * {@code c_1}, {@code c_2}, ... {@code c_m} are other static offset * constants (such as field offsets) which are derived from the layout path. *

- * For any given dynamic argument {@code x_i}, it must be that {@code 0 < x_i < size_i}, + * For any given dynamic argument {@code x_i}, it must be that {@code 0 <= x_i < size_i}, * where {@code size_i} is the size of the open path element associated with {@code x_i}. * Otherwise, the returned method handle throws {@link IndexOutOfBoundsException}. * @@ -633,7 +633,7 @@ public sealed interface MemoryLayout * accessed memory segment. *

  • If the provided layout path has an open path element whose size is {@code S}, * its corresponding trailing {@code long} coordinate value {@code I} must be - * {@code 0 < I < S}, or an {@link IndexOutOfBoundsException} is thrown.
  • + * {@code 0 <= I < S}, or an {@link IndexOutOfBoundsException} is thrown. *
  • The accessed memory segment must be * {@link MemorySegment#isAccessibleBy(Thread) accessible} from the thread * performing the access operation, or a {@link WrongThreadException} is thrown.
  • @@ -761,7 +761,7 @@ public sealed interface MemoryLayout * accessed memory segment. *
  • If the provided layout path has an open path element whose size is {@code S}, * its corresponding trailing {@code long} coordinate value {@code I} must be - * {@code 0 < I < S}, or an {@link IndexOutOfBoundsException} is thrown.
  • + * {@code 0 <= I < S}, or an {@link IndexOutOfBoundsException} is thrown. *
  • The accessed memory segment must be * {@link MemorySegment#isAccessibleBy(Thread) accessible} from the thread * performing the access operation, or a {@link WrongThreadException} is thrown.