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

ExE Boss duke at openjdk.org
Fri May 2 12:06:49 UTC 2025


On Tue, 29 Apr 2025 07:54:23 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Propose to finalize scoped values.
>> The only functional change is that the orElse() method no longer accepts a null argument.
>
> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Since when?

src/java.base/share/classes/java/lang/ScopedValue.java line 1:

> 1: /*

It occurred to me that `ScopedValue.NEW_THREAD_BINDINGS` can be made package‑private and used in `Thread`, removing duplication in `Thread.NEW_THREAD_BINDINGS`.

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

This was done this way back when `ScopedValue` lived under the `jdk.incubator.*` package tree.

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

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


More information about the core-libs-dev mailing list