From aed20979e67f12138a8bf2fdf0477c220bf1e52a Mon Sep 17 00:00:00 2001 From: Chris Vest Date: Fri, 15 Jan 2021 12:03:26 +0100 Subject: [PATCH] Update the javadocs on FastThreadLocal (#10942) Motivation: The writing was unclear. Modification: Clarified the documentation. Result: No more ambiguity about what FTL.remove() does. Fixes #10914 --- .../java/io/netty/util/concurrent/FastThreadLocal.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/io/netty/util/concurrent/FastThreadLocal.java b/common/src/main/java/io/netty/util/concurrent/FastThreadLocal.java index f663107d42..9431f2635b 100644 --- a/common/src/main/java/io/netty/util/concurrent/FastThreadLocal.java +++ b/common/src/main/java/io/netty/util/concurrent/FastThreadLocal.java @@ -208,7 +208,7 @@ public class FastThreadLocal { } /** - * @return see {@link InternalThreadLocalMap#setIndexedVariable(int, Object)}. + * @see InternalThreadLocalMap#setIndexedVariable(int, Object). */ private void setKnownNotUnset(InternalThreadLocalMap threadLocalMap, V value) { if (threadLocalMap.setIndexedVariable(index, value)) { @@ -231,15 +231,16 @@ public class FastThreadLocal { return threadLocalMap != null && threadLocalMap.isIndexedVariableSet(index); } /** - * Sets the value to uninitialized; a proceeding call to get() will trigger a call to initialValue(). + * Sets the value to uninitialized for the specified thread local map. + * After this, any subsequent call to get() will trigger a new call to initialValue(). */ public final void remove() { remove(InternalThreadLocalMap.getIfSet()); } /** - * Sets the value to uninitialized for the specified thread local map; - * a proceeding call to get() will trigger a call to initialValue(). + * Sets the value to uninitialized for the specified thread local map. + * After this, any subsequent call to get() will trigger a new call to initialValue(). * The specified thread local map must be for the current thread. */ @SuppressWarnings("unchecked")