Author: markt
Date: Thu Jan 29 19:12:06 2015
New Revision: 1655811
URL: http://svn.apache.org/r1655811
Log:
Fix an NPE appearing in the unit test logs.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties?rev=1655811&r1=1655810&r2=1655811&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties Thu
Jan 29 19:12:06 2015
@@ -91,6 +91,8 @@ channel.nio.ssl.incompleteHandshake=Hand
channel.nio.ssl.closing=Channel is in closing state.
channel.nio.ssl.invalidBuffer=You can only read using the application read
buffer provided by the handler.
+socket.closed=The socket associated with this connection has been closed.
+
socket.apr.clientAbort=The client aborted the connection.
socket.apr.read.error=Unexpected error [{0}] reading data from the APR/native
socket [{1}] with wrapper [{2}].
socket.apr.read.sslGeneralError=An APR general error was returned by the SSL
read operation on APR/native socket [{0}] with wrapper [{1}]. It will be
treated as EAGAIN and the socket returned to the poller.
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1655811&r1=1655810&r2=1655811&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Thu Jan 29
19:12:06 2015
@@ -1002,6 +1002,9 @@ public class Nio2Endpoint extends Abstra
}
}
+ if (socketBufferHandler == null) {
+ throw new IOException(sm.getString("socket.closed"));
+ }
socketBufferHandler.configureReadBufferForRead();
int remaining = socketBufferHandler.getReadBuffer().remaining();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]