RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v33]

Per Minborg pminborg at openjdk.org
Thu Apr 3 09:22:08 UTC 2025


On Wed, 2 Apr 2025 16:31:03 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add info that Map#values and Map#entrySet are stable
>
> src/java.base/share/classes/jdk/internal/lang/stable/StableValueImpl.java line 125:
> 
>> 123:         Objects.requireNonNull(supplier);
>> 124:         final Object t = wrappedContentAcquire();
>> 125:         return (t == null) ? orElseSetSlowPath(supplier) : unwrap(t);
> 
> Is it faster to have the slow path on the true-case?

I try to use non-negated conditions for clarity but have not checked any potential performance implications. Maybe we could investigate that after integration.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r2026563104


More information about the core-libs-dev mailing list