From aa77995c3316825c4750b2757a0aa5045f11c1d6 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Fri, 10 May 2024 15:42:44 +0100 Subject: [PATCH] Address review comments --- .../share/classes/java/lang/foreign/MemoryLayout.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 51710318a8920..e688d46357d04 100644 --- a/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java +++ b/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java @@ -572,9 +572,9 @@ 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. *

- * The returned method handle throws {@link IndexOutOfBoundsException} if the provided layout path has an open - * path element whose size is {@code S}, and its corresponding trailing {@code long} parameter - * has a value {@code I} such that {@code I >= S} or {@code I < 0}. + * 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}. * * @apiNote The returned method handle can be used to compute a layout offset, * similarly to {@link #byteOffset(PathElement...)}, but more flexibly, as