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

Per Minborg pminborg at openjdk.org
Wed Apr 2 12:55:11 UTC 2025


On Wed, 2 Apr 2025 09:21:17 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Per Minborg has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Add lazy toSting for StableMap::values
>>  - Make toString for reversed and sublist lazy
>
> src/java.base/share/classes/java/lang/StableValue.java line 378:
> 
>> 376:      * @param value to set
>> 377:      */
>> 378:     boolean trySet(T value);
> 
> This can probably throw `IllegalStateException` too right -- e.g. if used inside a supplier passed to `orElseSet` ?

Nice catch.

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

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


More information about the core-libs-dev mailing list