You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/04/27 12:40:26 UTC

svn commit: r1741208 - /tomcat/trunk/java/org/apache/catalina/valves/StuckThreadDetectionValve.java

Author: markt
Date: Wed Apr 27 10:40:26 2016
New Revision: 1741208

URL: http://svn.apache.org/viewvc?rev=1741208&view=rev
Log:
Review of Map / ConcurrentMap / ConcurrentHashMap
Declare field using interface rather than implementation.

Modified:
    tomcat/trunk/java/org/apache/catalina/valves/StuckThreadDetectionValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/StuckThreadDetectionValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/StuckThreadDetectionValve.java?rev=1741208&r1=1741207&r2=1741208&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/StuckThreadDetectionValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/StuckThreadDetectionValve.java Wed Apr 27 10:40:26 2016
@@ -20,6 +20,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 import java.util.Queue;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentLinkedQueue;
@@ -79,11 +80,8 @@ public class StuckThreadDetectionValve e
      * That way, Threads can be GC'ed, eventhough the Valve still thinks they
      * are stuck (caused by a long monitor interval)
      */
-    private final ConcurrentHashMap<Long, MonitoredThread> activeThreads =
-            new ConcurrentHashMap<>();
-    /**
-     *
-     */
+    private final Map<Long, MonitoredThread> activeThreads = new ConcurrentHashMap<>();
+
     private final Queue<CompletedStuckThread> completedStuckThreadsQueue =
             new ConcurrentLinkedQueue<>();
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org