private static Object get(ThreadLocal threadLocal, Thread thread) {
    try {
      Object threadLocalMap =
          invokePrivate(threadLocal, "getMap", new Class[] {Thread.class}, new Object[] {thread});

      if (threadLocalMap != null) {
        Object entry = invokePrivate(threadLocalMap, "getEntry", new Class[] {ThreadLocal.class},
            new Object[] {threadLocal});
        if (entry != null) {
          return getPrivate(entry, "value");
        }
      }
      return null;
    } catch (Exception e) {
      throw new RuntimeException("Unable to extract thread local", e);
    }
  }
Dangerous method. Uses reflection to extract the thread local for a given thread.

Unlike get(), this method does not set the initial value if none is found
geode-core/src/main/java/org/apache/geode/distributed/internal/deadlock/UnsafeThreadLocal.java