tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1574167 - /tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Date Tue, 04 Mar 2014 18:10:56 GMT
Author: remm
Date: Tue Mar  4 18:10:56 2014
New Revision: 1574167

URL: http://svn.apache.org/r1574167
Log:
Avoid possible NPE.

Modified:
    tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1574167&r1=1574166&r2=1574167&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Tue Mar  4 18:10:56
2014
@@ -426,10 +426,12 @@ public class CoyoteAdapter implements Ad
             if (!request.isAsync() && !comet) {
                 request.finishRequest();
                 response.finishResponse();
-                request.getMappingData().context.logAccess(
-                        request, response,
-                        System.currentTimeMillis() - req.getStartTime(),
-                        false);
+                if (request.getMappingData().context != null) {
+                    request.getMappingData().context.logAccess(
+                            request, response,
+                            System.currentTimeMillis() - req.getStartTime(),
+                            false);
+                }
             }
 
         } catch (IOException e) {



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


Mime
View raw message