RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v56]
Per Minborg
pminborg at openjdk.org
Tue Apr 22 10:37:02 UTC 2025
On Thu, 17 Apr 2025 16:25:21 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address comments on original vs underlying
>
> src/java.base/share/classes/java/lang/StableValue.java line 126:
>
>> 124: * This property is crucial as evaluation of the supplier may have side effects,
>> 125: * e.g., the call above to {@code Logger.create()} may result in storage resources
>> 126: * being prepared.
>
> I think it's better to avoid abbreviations like 'e.g.' in javadoc, and go for the full 'for example'.
>
> Also, WRT the contents of this paragraph: if multiple threads execute the `orElseSet` statement concurrently, multiple different `Supplier` instances might be created and passed to `orElseSet`. I think the method guarantees that only one of these (multiple) suppliers will be evaluated. But, technically, there is no 'the supplier', I suppose.
I've changed the text to cover the case where one or several suppliers are provided.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r2053838293
More information about the core-libs-dev
mailing list