RFR: 8003246: Add Supplier to ThreadLocal (original) (raw)
Akhil Arora akhil.arora at oracle.com
Thu Dec 6 18:00:41 UTC 2012
- Previous message: RFR: 8003246: Add Supplier to ThreadLocal
- Next message: RFR: 8003246: Add Supplier to ThreadLocal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12/06/2012 09:38 AM, Doug Lea wrote:
Much better; thanks! As a minor matter, it probably makes sense to give that class a name. Even though it is a non-public static class, the name will be seen here and there by debuggers, stacktraces, etc, and the default "$" name will be confusing. As in:
static final class SuppliedThreadLocal extends ThreadLocal .. public static ThreadLocal withInitial(Supplier<? extends T> supplier) { return new SuppliedThreadLocal(supplier); }
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
Thanks
- Previous message: RFR: 8003246: Add Supplier to ThreadLocal
- Next message: RFR: 8003246: Add Supplier to ThreadLocal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]