On Thu, 24 Apr 2025 10:37:59 GMT, Per Minborg <pminb...@openjdk.org> wrote:
>> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Make public constuctor private src/java.base/share/classes/java/lang/StableValue.java line 470: > 468: * @param other to return if the contents is not set > 469: */ > 470: T orElse(T other); Just to note that JEP 506 is proposing to change ScopedValue.orElse to disallow null. A ScopedValue can be bound to null (e.g. usage in Subject API) so using orElse(null) is problematic. A orNull may be added later if needed. As a StableValue can hold null then it's similar and might be surprising to developers to have the two APIs be different here. Something to look at again after JEP 502 is integrated, I'm not suggesting changing anything in this PR of course. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r2059637511