/** * Returns a {@link ReentrantLock} used to serialize access to the construction of a thread local; this is only needed under JDK 1.5 (due to a bug in the JDK); * for other JDKs, a {@link DummyLock} is returned. * * @return lock to use when creating * @since 5.3 * @deprecated Deprecated in 5.4 with no replacement. */ public static Lock createLockForThreadLocalCreation() { return JDK_1_5 ? new ReentrantLock() : new DummyLock(); } }
/** * Returns a {@link ReentrantLock} used to serialize access to the construction of a thread local; this is only needed under JDK 1.5 (due to a bug in the JDK); * for other JDKs, a {@link DummyLock} is returned. * * @return lock to use when creating * @since 5.3 * @deprecated Deprecated in 5.4 with no replacement. */ public static Lock createLockForThreadLocalCreation() { return JDK_1_5 ? new ReentrantLock() : new DummyLock(); } }