On Tue, 25 Mar 2025 15:52:07 GMT, Per Minborg <pminb...@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:
> 
>   Revamp toString() methods

src/java.base/share/classes/jdk/internal/lang/stable/StableValueFactories.java 
line 41:

> 39:     public static <T, R> Function<T, R> function(Set<? extends T> inputs,
> 40:                                                  Function<? super T, ? 
> extends R> original) {
> 41:         if (inputs.isEmpty()) {

If it is worth optimizing the isEmpty scenario, it might be preferable to let 
each xxxFunction.of return an appropriate instance, to keep the number of 
varying subclasses to a minimum.

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

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

Reply via email to