ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null)
if (parentThread.locals != null)
  static void newChildThread(Thread childThread)  {		// The currentThread is the parent of the new thread.		Thread parentThread = Thread.currentThread();		// Note that we don't have to synchronize, as only this thread will    // ever modify the returned heritage and threadMap is a synchronizedMap.     ArrayList heritage = (ArrayList) threadMap.get(parentThread);    if (heritage != null)      {			threadMap.put(childThread, heritage.clone());			// Perform the inheritance.			Iterator it = heritage.iterator();			int i = heritage.size();        while (--i >= 0)          {            InheritableThreadLocal local = (InheritableThreadLocal) it.next();				Object parentValue = local.valueMap.get(parentThread);            if (parentValue != null)              {                Object childValue = local.childValue(parentValue == NULL                                                     ? null : parentValue);                local.valueMap.put(childThread, (childValue == null                                                 ? NULL : parentValue));				}			}		}	}