Returns the current thread's "initial value" for this
thread-local variable. This method will be invoked the first
time a thread accesses the variable with the
ThreadLocal.get()
method, unless the thread previously invoked the
ThreadLocal.set(T)
method, in which case the
initialValue method will not
be invoked for the thread. Normally, this method is invoked at
most once per thread, but it may be invoked again in case of
subsequent invocations of
ThreadLocal.remove()
followed by
ThreadLocal.get()
.
This implementation simply returns null; if the
programmer desires thread-local variables to have an initial
value other than null, ThreadLocal must be
subclassed, and this method overridden. Typically, an
anonymous inner class will be used.
Returns:
the initial value for this thread-local