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 2012/07/12 12:02:15 UTC

svn commit: r1360609 - in /tomcat/trunk/java/org/apache/coyote: http11/NpnHandler.java spdy/SpdyAprNpnHandler.java

Author: markt
Date: Thu Jul 12 10:02:15 2012
New Revision: 1360609

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

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/NpnHandler.java
    tomcat/trunk/java/org/apache/coyote/spdy/SpdyAprNpnHandler.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/NpnHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/NpnHandler.java?rev=1360609&r1=1360608&r2=1360609&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/NpnHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/NpnHandler.java Thu Jul 12 10:02:15 2012
@@ -27,7 +27,7 @@ import org.apache.tomcat.util.net.Socket
  * Interface specific for protocols that negotiate at NPN level, like
  * SPDY. This is only available for APR, will replace the HTTP framing.
  */
-public interface NpnHandler {
+public interface NpnHandler<T> {
 
     /**
      * Check if the socket has negotiated the right NPN and process it.
@@ -37,7 +37,7 @@ public interface NpnHandler {
      * @return OPEN if the socket doesn't have the right npn.
      *    CLOSE if processing is done. LONG to request read polling.
      */
-    SocketState process(SocketWrapper<?> socket, SocketStatus status);
+    SocketState process(SocketWrapper<T> socket, SocketStatus status);
 
     /**
      * Initialize the npn handler.

Modified: tomcat/trunk/java/org/apache/coyote/spdy/SpdyAprNpnHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/spdy/SpdyAprNpnHandler.java?rev=1360609&r1=1360608&r2=1360609&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/spdy/SpdyAprNpnHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/spdy/SpdyAprNpnHandler.java Thu Jul 12 10:02:15 2012
@@ -58,7 +58,7 @@ import org.apache.tomcat.util.net.Socket
  * negotiated by TLS.
  *
  */
-public class SpdyAprNpnHandler implements NpnHandler {
+public class SpdyAprNpnHandler implements NpnHandler<Long> {
 
     private static final Log log = LogFactory.getLog(AprEndpoint.class);
 
@@ -90,12 +90,12 @@ public class SpdyAprNpnHandler implement
     }
 
     @Override
-    public SocketState process(SocketWrapper<?> socketO, SocketStatus status) {
+    public SocketState process(SocketWrapper<Long> socketWrapper,
+            SocketStatus status) {
 
-        SocketWrapper<Long> socketW = (SocketWrapper<Long>) socketO;
-        long socket = socketW.getSocket().longValue();
+        long socket = socketWrapper.getSocket().longValue();
 
-        if (! spdyContext.getNetSupport().isSpdy(socketW.getSocket())) {
+        if (! spdyContext.getNetSupport().isSpdy(socketWrapper.getSocket())) {
             return SocketState.OPEN;
         }
 



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