diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContext.java b/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContext.java index 2b7ccf8b9d36b..4656077b5c96c 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContext.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContext.java @@ -381,8 +381,7 @@ public String getHeader(String key) { * Returns the persistent header for the given key or null if not present - persistent headers cannot be stashed */ public Object getPersistent(String key) { - Object value = threadLocal.get().persistentHeaders.get(key); - return value; + return threadLocal.get().persistentHeaders.get(key); } /**