From 0ddbfb25a62e85d5f009e5f0ff9d3874a2892a21 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 20 Jan 2016 09:46:36 +0100 Subject: [PATCH] Fix JavaDoc comment --- .../elasticsearch/common/util/concurrent/ThreadContext.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/common/util/concurrent/ThreadContext.java b/core/src/main/java/org/elasticsearch/common/util/concurrent/ThreadContext.java index d3095b1d259..8b304e7a903 100644 --- a/core/src/main/java/org/elasticsearch/common/util/concurrent/ThreadContext.java +++ b/core/src/main/java/org/elasticsearch/common/util/concurrent/ThreadContext.java @@ -43,13 +43,13 @@ import java.util.concurrent.atomic.AtomicBoolean; * and directly added as the headers of the threads {@link ThreadContext} (see {@link #readHeaders(StreamInput)}. In order to not modify the context that is currently * active on this thread the network code uses a try/with pattern to stash it's current context, read headers into a fresh one and once the request is handled or a handler thread * is forked (which in turn inherits the context) it restores the previous context. For instance: - * + *

*
  *     // current context is stashed and replaced with a default context
  *     try (StoredContext context = threadContext.stashContext()) {
  *         threadContext.readHeaders(in); // read headers into current context
  *         if (fork) {
- *             threadPool.execute(() -> request.handle()); // inherits context
+ *             threadPool.execute(() -> request.handle()); // inherits context
  *         } else {
  *             request.handle();
  *         }
@@ -57,8 +57,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
  *     // previous context is restored on StoredContext#close()
  * 
* - *

- * */ public final class ThreadContext implements Closeable, Writeable{