Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49104
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 14 Apr 2010 22:24:17 +0000 (22:24 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 14 Apr 2010 22:24:17 +0000 (22:24 +0000)
Generics

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@934223 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/ajp/AjpProtocol.java
java/org/apache/coyote/http11/Http11Protocol.java
java/org/apache/tomcat/util/net/JIoEndpoint.java

index 008a310..0ea3ebe 100644 (file)
@@ -321,8 +321,8 @@ public class AjpProtocol
         protected AjpProtocol proto;
         protected AtomicLong registerCount = new AtomicLong(0);
         protected RequestGroupInfo global = new RequestGroupInfo();
-        protected ConcurrentHashMap<SocketWrapper, AjpProcessor> connections =
-            new ConcurrentHashMap<SocketWrapper, AjpProcessor>();
+        protected ConcurrentHashMap<SocketWrapper<Socket>, AjpProcessor> connections =
+            new ConcurrentHashMap<SocketWrapper<Socket>, AjpProcessor>();
 
         protected ConcurrentLinkedQueue<AjpProcessor> recycledProcessors = 
             new ConcurrentLinkedQueue<AjpProcessor>() {
index cb7fe62..eb4b1b0 100644 (file)
@@ -32,7 +32,6 @@ import org.apache.coyote.RequestInfo;
 import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.net.JIoEndpoint;
-import org.apache.tomcat.util.net.NioChannel;
 import org.apache.tomcat.util.net.SSLImplementation;
 import org.apache.tomcat.util.net.ServerSocketFactory;
 import org.apache.tomcat.util.net.SocketStatus;
@@ -190,8 +189,8 @@ public class Http11Protocol extends AbstractHttp11Protocol {
         protected Http11Protocol proto;
         protected AtomicLong registerCount = new AtomicLong(0);
         protected RequestGroupInfo global = new RequestGroupInfo();
-        protected ConcurrentHashMap<SocketWrapper, Http11Processor> connections =
-            new ConcurrentHashMap<SocketWrapper, Http11Processor>();
+        protected ConcurrentHashMap<SocketWrapper<Socket>, Http11Processor> connections =
+            new ConcurrentHashMap<SocketWrapper<Socket>, Http11Processor>();
 
         protected ConcurrentLinkedQueue<Http11Processor> recycledProcessors = 
             new ConcurrentLinkedQueue<Http11Processor>() {
index ca09f7a..15f9453 100644 (file)
@@ -144,9 +144,10 @@ public class JIoEndpoint extends AbstractEndpoint {
                     // Ignore
                 }
                 long now = System.currentTimeMillis();
-                Iterator<SocketWrapper> sockets = waitingRequests.iterator();
+                Iterator<SocketWrapper<Socket>> sockets =
+                    waitingRequests.iterator();
                 while (sockets.hasNext()) {
-                    SocketWrapper socket = sockets.next();
+                    SocketWrapper<Socket> socket = sockets.next();
                     long access = socket.getLastAccess();
                     if ((now-access)>socket.getTimeout()) {
                         processSocket(socket,SocketStatus.TIMEOUT);
@@ -538,7 +539,8 @@ public class JIoEndpoint extends AbstractEndpoint {
         return true;
     }
 
-    protected ConcurrentLinkedQueue<SocketWrapper> waitingRequests = new ConcurrentLinkedQueue<SocketWrapper>();
+    protected ConcurrentLinkedQueue<SocketWrapper<Socket>> waitingRequests =
+        new ConcurrentLinkedQueue<SocketWrapper<Socket>>();
 
     private static class PrivilegedSetTccl
     implements PrivilegedAction<Void> {