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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org