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

rzo1 pushed a commit to branch tomee-8.x
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/tomee-8.x by this push:
     new a397ae0b51 Adapt to new Tomcat threadNameBindings, use Map Interface 
instead of implementation
a397ae0b51 is described below

commit a397ae0b51c2a7fd24eb6bb13f99d2c91b2cac3b
Author: Florian-Rau <[email protected]>
AuthorDate: Wed Oct 26 07:31:10 2022 +0200

    Adapt to new Tomcat threadNameBindings, use Map Interface instead of 
implementation
---
 .../java/org/apache/tomee/catalina/TomcatThreadContextListener.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatThreadContextListener.java
 
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatThreadContextListener.java
index c591fa0c27..dd6af8a245 100644
--- 
a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatThreadContextListener.java
+++ 
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatThreadContextListener.java
@@ -26,7 +26,7 @@ import javax.naming.NamingException;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.util.Hashtable;
+import java.util.Map;
 
 /**
  * Tomcat thread context listener.
@@ -49,7 +49,7 @@ public class TomcatThreadContextListener implements 
ThreadContextListener {
      * getThreadName method in class ContextBindings
      */
     protected Method method;
-    private Hashtable<Thread, Object> threadNameBindings;
+    private Map<Thread, Object> threadNameBindings;
 
     /**
      * Creates a new instance.
@@ -63,7 +63,7 @@ public class TomcatThreadContextListener implements 
ThreadContextListener {
 
             final Field threadNameBindingsField = 
ContextBindings.class.getDeclaredField("threadObjectBindings");
             threadNameBindingsField.setAccessible(true);
-            threadNameBindings = (Hashtable<Thread, Object>) 
threadNameBindingsField.get(null);
+            threadNameBindings = (Map<Thread, Object>) 
threadNameBindingsField.get(null);
         } catch (final Exception e) {
             LOGGER.error("Expected ContextBinding to have the method 
getThreadName()");
         }

Reply via email to