tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1803622 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
Date Tue, 01 Aug 2017 07:59:40 GMT
Author: markt
Date: Tue Aug  1 07:59:40 2017
New Revision: 1803622

URL: http://svn.apache.org/viewvc?rev=1803622&view=rev
Log:
Avoid NPE

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1803622&r1=1803621&r2=1803622&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Aug  1 07:59:40 2017
@@ -840,7 +840,11 @@ public class StandardContext extends Con
          * differentiate between a Response using this default encoding and one
          * that has been explicitly configured.
          */
-        this.responseEncoding = new String(responseEncoding);
+        if (responseEncoding == null) {
+            this.responseEncoding = null;
+        } else {
+            this.responseEncoding = new String(responseEncoding);
+        }
     }
 
 



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


Mime
View raw message