From 70010e34c15cca8ffa26dec2ccbacdd0bf366c72 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Wed, 15 May 2024 16:38:21 +0100 Subject: [PATCH] cleanup javadoc --- .../java/lang/foreign/MemoryLayout.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) 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 e4acd7d6bc30f..7087ec94a7bac 100644 --- a/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java +++ b/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java @@ -625,9 +625,12 @@ public sealed interface MemoryLayout * (this layout), or an {@link IllegalArgumentException} is thrown. Note * that the alignment constraint of the root layout can be more strict * (but not less) than the alignment constraint of the selected value layout. - *
  • The size of the accessed memory segment (taking into account the base offset {@code B}), - * must be equal or greater than the {@linkplain #byteSize() size} of the root layout - * (this layout), or an {@link IndexOutOfBoundsException} is thrown. + *
  • The access operation must fall inside the spatial bounds of the accessed + * memory segment, or an {@link IndexOutOfBoundsException} is thrown. This is the case + * when {@code B + A <= S}, where {@code O} is the base offset (defined above), + * {@code A} is the size of this layout and {@code S} is the size of the + * accessed memory segment. Note that the size of this layout might be bigger + * than the size of the accessed layout (e.g. when accessing a struct member).
  • *
  • The offset of the access operation (computed as above) must fall inside * the spatial bounds of the accessed memory segment, or an * {@link IndexOutOfBoundsException} is thrown. This is the case when @@ -756,12 +759,12 @@ public sealed interface MemoryLayout * (this layout), or an {@link IllegalArgumentException} is thrown. Note * that the alignment constraint of the root layout can be more strict * (but not less) than the alignment constraint of the selected value layout.
  • - *
  • The offset of the access operation (computed as above) must fall inside - * the spatial bounds of the accessed memory segment, or an - * {@link IndexOutOfBoundsException} is thrown. This is the case when - * {@code O + A <= S}, where {@code O} is the accessed offset (computed as above), - * {@code A} is the size of the selected layout and {@code S} is the size of the - * accessed memory segment.
  • + *
  • The access operation must fall inside the spatial bounds of the accessed + * memory segment, or an {@link IndexOutOfBoundsException} is thrown. This is the case + * when {@code B + A <= S}, where {@code O} is the base offset (defined above), + * {@code A} is the size of this layout and {@code S} is the size of the + * accessed memory segment. Note that the size of this layout might be bigger + * than the size of the accessed layout (e.g. when accessing a struct member).
  • *
  • 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.
  • @@ -825,15 +828,12 @@ public sealed interface MemoryLayout * (this layout), or an {@link IllegalArgumentException} will be issued. Note * that the alignment constraint of the root layout can be more strict * (but not less) than the alignment constraint of the selected layout. - *
  • The size of the accessed memory segment (taking into account the base offset {@code B}), - * must be equal or greater than the {@linkplain #byteSize() size} of the root layout - * (this layout), or an {@link IndexOutOfBoundsException} is thrown. - *
  • The start offset of the slicing operation (computed as above) must fall - * inside the spatial bounds of the accessed memory segment, or an - * {@link IndexOutOfBoundsException} is thrown. This is the case when - * {@code O + A <= S}, where {@code O} is the start offset of - * the slicing operation (computed as above), {@code A} is the size of the - * selected layout and {@code S} is the size of the accessed memory segment.
  • + *
  • The slicing operation must fall inside the spatial bounds of the accessed + * memory segment, or an {@link IndexOutOfBoundsException} is thrown. This is the case + * when {@code B + A <= S}, where {@code O} is the base offset (defined above), + * {@code A} is the size of this layout and {@code S} is the size of the + * accessed memory segment. Note that the size of this layout might be bigger + * than the size of the accessed layout (e.g. when accessing a struct member).
  • *
  • 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.