RFR: 8319166: Typos in the JavaDocs for MemorySegment

Per Minborg pminborg at openjdk.org
Thu Nov 2 11:53:05 UTC 2023


On Thu, 2 Nov 2023 07:40:52 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> This PR proposes to fix a number of JavaDoc typos in the `MemorySegment::getAtIndex` and `::setAtIndex`.

src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 2014:

> 2012:      * @throws IllegalArgumentException if {@code layout.byteAlignment() > layout.byteSize()}.
> 2013:      * @throws IndexOutOfBoundsException if {@code index * layout.byteSize()} overflows.
> 2014:      * @throws IndexOutOfBoundsException if {@code index * layout.byteSize() > byteSize() - layout.byteSize()}.

Here is the change for `setAtIndex(AddressLayout, ...)`

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16469#discussion_r1379987973


More information about the core-libs-dev mailing list