[foreign-memaccess+abi] RFR: 8266626: Check that the target address of a native call is not NULL [v3]

Jorn Vernee jvernee at openjdk.java.net
Mon May 10 13:22:40 UTC 2021


On Mon, 10 May 2021 13:09:10 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java line 200:
>> 
>>> 198:      * @return the downcall method handle.
>>> 199:      * @throws IllegalArgumentException in the case of a method type and function descriptor mismatch, or if the symbol
>>> 200:      *                                  is {@link MemoryAddress#NULL}
>> 
>> Is the indentation deliberate? What about NPE?
>
> Yes, the indentation is deliberate.
> 
> I'll add the NPE as well, looks like that was missing from before.

Actually, I think the NPE is covered by this comment on the class 


 * <p> Unless otherwise specified, passing a {@code null} argument, or an array argument containing one or more {@code null}
 * elements to a method in this class causes a {@link NullPointerException NullPointerException} to be thrown. </p>
 ```

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

PR: https://git.openjdk.java.net/panama-foreign/pull/530


More information about the panama-dev mailing list