tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1175896 - in /tomcat/trunk: java/org/apache/catalina/startup/Embedded.java java/org/apache/catalina/valves/StuckThreadDetectionValve.java test/org/apache/tomcat/util/threads/TestLimitLatch.java
Date Mon, 26 Sep 2011 14:59:59 GMT
Author: markt
Date: Mon Sep 26 14:59:59 2011
New Revision: 1175896

URL: http://svn.apache.org/viewvc?rev=1175896&view=rev
Log:
Fix some FindBugs warnings

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Embedded.java
    tomcat/trunk/java/org/apache/catalina/valves/StuckThreadDetectionValve.java
    tomcat/trunk/test/org/apache/tomcat/util/threads/TestLimitLatch.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Embedded.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Embedded.java?rev=1175896&r1=1175895&r2=1175896&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Embedded.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Embedded.java Mon Sep 26 14:59:59 2011
@@ -160,7 +160,7 @@ public class Embedded  extends StandardS
     /**
      * Custom mappings of login methods to authenticators
      */
-    protected HashMap<String,Authenticator> authenticators;
+    protected volatile HashMap<String,Authenticator> authenticators;
 
 
     /**

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=1175896&r1=1175895&r2=1175896&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/StuckThreadDetectionValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/StuckThreadDetectionValve.java Mon Sep 26
14:59:59 2011
@@ -177,7 +177,7 @@ public class StuckThreadDetectionValve e
         // Keeping a reference to the thread object here does not prevent
         // GC'ing, as the reference is removed from the Map in the finally clause
 
-        Long key = new Long(Thread.currentThread().getId());
+        Long key = Long.valueOf(Thread.currentThread().getId());
         StringBuffer requestUrl = request.getRequestURL();
         if(request.getQueryString()!=null) {
             requestUrl.append("?");
@@ -240,7 +240,7 @@ public class StuckThreadDetectionValve e
         return result;
     }
 
-    private class MonitoredThread {
+    private static class MonitoredThread {
 
         /**
          * Reference to the thread to get a stack trace from background task
@@ -288,7 +288,7 @@ public class StuckThreadDetectionValve e
         }
     }
 
-    private class CompletedStuckThread {
+    private static class CompletedStuckThread {
 
         private String threadName;
         private long totalActiveTime;

Modified: tomcat/trunk/test/org/apache/tomcat/util/threads/TestLimitLatch.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/threads/TestLimitLatch.java?rev=1175896&r1=1175895&r2=1175896&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/util/threads/TestLimitLatch.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/threads/TestLimitLatch.java Mon Sep 26 14:59:59
2011
@@ -92,7 +92,7 @@ public class TestLimitLatch {
         assertFalse("No threads should be waiting", latch.hasQueuedThreads());
     }
 
-    private class TestThread extends Thread {
+    private static class TestThread extends Thread {
         
         private int holdTime;
         private LimitLatch latch;



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


Mime
View raw message