RFR: 8003246: Add Supplier to ThreadLocal

Remi Forax forax at univ-mlv.fr
Thu Dec 6 19:02:33 UTC 2012


On 12/06/2012 07:29 PM, Doug Lea wrote:
> On 12/06/12 13:00, Akhil Arora wrote:
>
>> http://cr.openjdk.java.net/~akhil/8003246.2/webrev/
>>
>> - added SuppliedThreadLocal inner class
>> - reverted javadoc changes to no-args constructor
>> - added null check for Supplier
>>
>
> Great! Thanks for the quick response.
>
> -Doug
>
>

Yes, great !

just nitpicking,
    return new SuppliedThreadLocal<T>(supplier);
should be
    return new SuppliedThreadLocal<>(supplier);

Also, can you add a @see in the constructor of ThreadLocal that 
references ThreadLocal.withInitialValue(Supplier).

cheers,
Rémi




More information about the core-libs-dev mailing list