Author: markt
Date: Wed Apr 13 14:18:00 2016
New Revision: 1738946

URL: http://svn.apache.org/viewvc?rev=1738946&view=rev
Log:
Use socketWrapper rather than socket to make the code clearer

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java
    tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java?rev=1738946&r1=1738945&r2=1738946&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java Wed Apr 13 
14:18:00 2016
@@ -40,7 +40,7 @@ public class NioChannel implements ByteC
     protected static final ByteBuffer emptyBuf = ByteBuffer.allocate(0);
 
     protected SocketChannel sc = null;
-    protected SocketWrapperBase<NioChannel> socket = null;
+    protected SocketWrapperBase<NioChannel> socketWrapper = null;
 
     protected final SocketBufferHandler bufHandler;
 
@@ -61,8 +61,8 @@ public class NioChannel implements ByteC
     }
 
 
-    void setSocketWrapper(SocketWrapperBase<NioChannel> socket) {
-        this.socket = socket;
+    void setSocketWrapper(SocketWrapperBase<NioChannel> socketWrapper) {
+        this.socketWrapper = socketWrapper;
     }
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java?rev=1738946&r1=1738945&r2=1738946&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java Wed Apr 
13 14:18:00 2016
@@ -186,7 +186,7 @@ public class SecureNioChannel extends Ni
                 }
                 case FINISHED: {
                     if (endpoint.hasNegotiableProtocols() && sslEngine 
instanceof SSLUtil.ProtocolInfo) {
-                        socket.setNegotiatedProtocol(((SSLUtil.ProtocolInfo) 
sslEngine).getNegotiatedProtocol());
+                        
socketWrapper.setNegotiatedProtocol(((SSLUtil.ProtocolInfo) 
sslEngine).getNegotiatedProtocol());
                     }
                     //we are complete if we have delivered the last package
                     handshakeComplete = !netOutBuffer.hasRemaining();
@@ -567,11 +567,11 @@ public class SecureNioChannel extends Ni
                 } else {
                     // The SSL session has increased the required buffer size
                     // since the buffer was created.
-                    if (dst == 
socket.getSocketBufferHandler().getReadBuffer()) {
+                    if (dst == 
socketWrapper.getSocketBufferHandler().getReadBuffer()) {
                         // This is the normal case for this code
-                        socket.getSocketBufferHandler().expand(
+                        socketWrapper.getSocketBufferHandler().expand(
                                 
sslEngine.getSession().getApplicationBufferSize());
-                        dst = socket.getSocketBufferHandler().getReadBuffer();
+                        dst = 
socketWrapper.getSocketBufferHandler().getReadBuffer();
                     } else {
                         // Can't expand the buffer as there is no way to signal
                         // to the caller that the buffer has been replaced.



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

Reply via email to