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

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Apr 3 12:22:05 UTC 2025


On Thu, 3 Apr 2025 11:34:03 GMT, Per Minborg <pminborg at 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:
> 
>   Move Serializable specs to @implNote

src/java.base/share/classes/java/lang/StableValue.java line 653:

> 651:      *                              {@code null} element.
> 652:      */
> 653:     static <T, R> Function<T, R> function(Set<? extends T> inputs,

The javadoc should say that the returned function throws IAE if the input is not supported, right? An alternative would be to have a factory that returns `Function<T, Optional<R>>` -- although that would be more cumbersome to use.

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

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


More information about the core-libs-dev mailing list