tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r657149 - /tomcat/trunk/java/org/apache/jasper/compiler/Validator.java
Date Fri, 16 May 2008 17:46:34 GMT
Author: markt
Date: Fri May 16 10:46:34 2008
New Revision: 657149

URL: http://svn.apache.org/viewvc?rev=657149&view=rev
Log:
Fix NPE reported on the dev list. The other toUpperCase() calls should be safe since the String
will be non-null when the method is called.

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/Validator.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Validator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Validator.java?rev=657149&r1=657148&r2=657149&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Validator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Validator.java Fri May 16 10:46:34 2008
@@ -326,7 +326,7 @@
                 Node.PageDirective pageDir) throws JasperException {
 
             Node.Root root = pageDir.getRoot();
-            String configEnc = root.getJspConfigPageEncoding().toUpperCase();
+            String configEnc = root.getJspConfigPageEncoding();
             String pageDirEnc = thePageDirEnc.toUpperCase();
 
             /*
@@ -336,6 +336,7 @@
              * "UTF-16LE" as identical.
              */
             if (configEnc != null) {
+                configEnc = configEnc.toUpperCase();
                 if (!pageDirEnc.equals(configEnc)
                         && (!pageDirEnc.startsWith("UTF-16") || !configEnc
                                 .startsWith("UTF-16"))) {



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


Mime
View raw message