On 2020. Aug 20., at 23:43, Remi Forax <fo...@univ-mlv.fr> wrote:
> 
> ----- Mail original -----
>> De: "Attila Szegedi" <szege...@gmail.com>
>> À: "core-libs-dev" <core-libs-dev@openjdk.java.net>
>> Envoyé: Jeudi 20 Août 2020 22:40:53
>> Objet: Review request for JDK-8251538: Modernize and lint Dynalink code
> 
>> ...
>> Oh, BTW, I really got an inspiration for adding “public static ClassValue<T>
>> computingValue(Function<Class<?>, T> f)” method to ClassValue class, similar 
>> to
>> Comparator.comparing. It’d allow lambdifying class values. (If you’re
>> listening, John :-) I suspect it being in java.lang would be a JCP-level 
>> change
>> so I kind-of don’t want to take it upon myself…)
> 
> this is also very similar to 
> https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/lang/ThreadLocal.html#withInitial(java.util.function.Supplier)
>  
> <https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/lang/ThreadLocal.html#withInitial(java.util.function.Supplier)>
> 
> and the proposed signature doesn't have the right wildcards, it should be
>  public static ClassValue<T> computingValue(Function<? super Class<?>, ? 
> extends T> f)

Never change, Remi :-)

> Thanks,
>>  Attila.
> 
> regards,
> Rémi

Attila.

Reply via email to