tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1417201 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Date Tue, 04 Dec 2012 21:38:55 GMT
Author: markt
Date: Tue Dec  4 21:38:54 2012
New Revision: 1417201

URL: http://svn.apache.org/viewvc?rev=1417201&view=rev
Log:
Fix FindBugs warning
Avoid NPE (although given an OOME has occurred I'm not sure it matters)

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1417201&r1=1417200&r2=1417201&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Dec  4 21:38:54 2012
@@ -1617,7 +1617,9 @@ public class NioEndpoint extends Abstrac
                 } catch (OutOfMemoryError oom) {
                     try {
                         oomParachuteData = null;
-                        socket.getPoller().cancelledKey(key,SocketStatus.ERROR);
+                        if (socket != null) {
+                            socket.getPoller().cancelledKey(key,SocketStatus.ERROR);
+                        }
                         releaseCaches();
                         log.error("", oom);
                     }catch ( Throwable oomt ) {



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


Mime
View raw message