RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Mar 22 19:05:49 UTC 2023
On Wed, 22 Mar 2023 17:34:36 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Improve javadocs for Linker::captureStateLayout
>
> src/java.base/share/classes/java/lang/foreign/Linker.java line 492:
>
>> 490: * Finally, the returned method handle will throw an {@link IllegalArgumentException} if the {@link MemorySegment}
>> 491: * parameter passed to it is associated with the {@link MemorySegment#NULL} address, or a {@link NullPointerException}
>> 492: * if that parameter is {@code null}.
>
> I think this isn't quite correct, as it only applies to the target address parameter. Also, we don't have to mention the NPE, as that's already mentioned in the package doc
> Suggestion:
>
> * Finally, the returned method handle will throw an {@link IllegalArgumentException} if the {@link MemorySegment}
> * representing the target address of the foreign function is the {@link MemorySegment#NULL} address.
Note: this text was just copied/adapted from toplevel javadoc and moved here. I think we have to say something about `null` as the text refers to `null` being passed as parameter to the returned MH, which is NOT covered by the package javadoc.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13079#discussion_r1145281749
More information about the build-dev
mailing list