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

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Apr 3 14:43:09 UTC 2025


On Thu, 3 Apr 2025 12:17:03 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> 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.

And, same for `int function`

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

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


More information about the core-libs-dev mailing list