You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2020/08/09 11:14:55 UTC

[jmeter] branch master updated: Use ThreadLocal.remove instead of set(null). It is safer

This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 216a649  Use ThreadLocal.remove instead of set(null). It is safer
216a649 is described below

commit 216a6498c02494ba0f5b6e440c398dff3b34c845
Author: Felix Schumacher <fe...@internetallee.de>
AuthorDate: Sun Aug 9 13:05:38 2020 +0200

    Use ThreadLocal.remove instead of set(null). It is safer
---
 src/core/src/main/java/org/apache/jmeter/util/JsseSSLManager.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/util/JsseSSLManager.java b/src/core/src/main/java/org/apache/jmeter/util/JsseSSLManager.java
index a80bd7c..f4ca272 100644
--- a/src/core/src/main/java/org/apache/jmeter/util/JsseSSLManager.java
+++ b/src/core/src/main/java/org/apache/jmeter/util/JsseSSLManager.java
@@ -188,7 +188,7 @@ public class JsseSSLManager extends SSLManager {
     public void resetContext() {
         if (!SHARED_SESSION_CONTEXT) {
             log.debug("Clearing session context for current thread");
-            this.threadlocal.set(null);
+            this.threadlocal.remove();
         }
     }