On Mon, 4 Aug 2025 14:58:07 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> Chen Liang has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Web review
>>   
>>   Co-authored-by: David Holmes 
>> <62092539+dholmes-...@users.noreply.github.com>
>
> src/hotspot/share/interpreter/bytecodeUtils.cpp line 1514:
> 
>> 1512:   return true;
>> 1513: }
>> 1514: 
> 
> Extra new line

Suggestion:

> src/java.base/share/classes/java/lang/NullPointerException.java line 75:
> 
>> 73: 
>> 74:     /// Creates an NPE with a custom backtrace configuration.
>> 75:     /// The exception has no message if detailed NPE is not enabled.
> 
> Don't mix markdown comments with regular javadoc comments, it just looks 
> inconsistent without adding value.
> Use regular // comments.

Suggestion:

    // Creates an NPE with a custom backtrace configuration.
    // The exception has no message if detailed NPE is not enabled.

> src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 637:
> 
>> 635:     /// Stack offset is the number of non-hidden frames to skip, 
>> pointing to the null-checking API.
>> 636:     /// Search slot is the slot where the null-checked value is passed 
>> in.
>> 637:     NullPointerException extendedNullPointerException(int stackOffset, 
>> int searchSlot);
> 
> Method should **not** be added to SharedSecrets solely for access by tests.
> Tests can use @modules to gain access.

This is intended to be an API directly called by future null-check APIs, like 
`Objects.requireNonNull` or `Checks.nullCheck`. I initially had code for rNN 
but decided to withhold that for a future patch since it involves CSR and other 
evaluations not related to this patch's efforts.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26600#discussion_r2254529734
PR Review Comment: https://git.openjdk.org/jdk/pull/26600#discussion_r2254532646
PR Review Comment: https://git.openjdk.org/jdk/pull/26600#discussion_r2254537044

Reply via email to