RFR: 8355022: Implement JEP 506: Scoped Values [v7]

Chen Liang liach at openjdk.org
Thu May 8 18:05:55 UTC 2025


On Thu, 8 May 2025 17:47:12 GMT, Petr Portnov | PROgrm_JARvis <duke at openjdk.org> wrote:

>> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix merge
>
> src/java.base/share/classes/java/lang/ScopedValue.java line 613:
> 
>> 611:      */
>> 612:     public T orElse(T other) {
>> 613:         Objects.requireNonNull(other);
> 
> Shouldn't the NPE be specified in the Javadoc?

In the class specification, right above the API notes:

 * <p> Unless otherwise specified, passing a {@code null} argument to a method in this
 * class will cause a {@link NullPointerException} to be thrown.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24923#discussion_r2080203356


More information about the compiler-dev mailing list