From c121e9002f33c88eec522cbac77c3fc7f11777e9 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 23 Apr 2008 21:37:09 +0000 Subject: [PATCH] Generics changes for o.a.t.util.threads No fucntional change git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@651075 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tomcat/util/threads/ThreadPool.java | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/java/org/apache/tomcat/util/threads/ThreadPool.java b/java/org/apache/tomcat/util/threads/ThreadPool.java index aa9bf8b92..473bdc809 100644 --- a/java/org/apache/tomcat/util/threads/ThreadPool.java +++ b/java/org/apache/tomcat/util/threads/ThreadPool.java @@ -96,9 +96,11 @@ public class ThreadPool { /** The threads that are part of the pool. * Key is Thread, value is the ControlRunnable */ - protected Hashtable threads=new Hashtable(); + protected Hashtable threads = + new Hashtable(); - protected Vector listeners=new Vector(); + protected Vector listeners = + new Vector(); /** Name of the threadpool */ @@ -180,10 +182,10 @@ public class ThreadPool { // Set for future threads this.threadPriority = threadPriority; - Enumeration currentThreads = getThreads(); + Enumeration currentThreads = getThreads(); Thread t = null; while(currentThreads.hasMoreElements()) { - t = (Thread) currentThreads.nextElement(); + t = currentThreads.nextElement(); t.setPriority(threadPriority); } } @@ -270,7 +272,7 @@ public class ThreadPool { public void addThread( Thread t, ControlRunnable cr ) { threads.put( t, cr ); for( int i=0; i getThreads(){ return threads.keys(); } @@ -784,7 +786,7 @@ public class ThreadPool { */ public String threadStatusString() { StringBuffer sb=new StringBuffer(); - Iterator it=threads.keySet().iterator(); + Iterator it=threads.keySet().iterator(); sb.append("
    "); while( it.hasNext()) { sb.append("
  • "); @@ -807,7 +809,7 @@ public class ThreadPool { */ public String[] getThreadStatus() { String status[]=new String[ threads.size()]; - Iterator it=threads.keySet().iterator(); + Iterator it=threads.keySet().iterator(); for( int i=0; ( i it=threads.keySet().iterator(); for( int i=0; ( i