From: markt Date: Fri, 16 May 2008 17:46:34 +0000 (+0000) Subject: Fix NPE reported on the dev list. The other toUpperCase() calls should be safe since... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c52a7461859bf54bb06e5f73cbacca30caadb461;p=tomcat7.0 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. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@657149 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/compiler/Validator.java b/java/org/apache/jasper/compiler/Validator.java index e97b02d08..cbc9fd69b 100644 --- a/java/org/apache/jasper/compiler/Validator.java +++ b/java/org/apache/jasper/compiler/Validator.java @@ -326,7 +326,7 @@ class Validator { 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 @@ class Validator { * "UTF-16LE" as identical. */ if (configEnc != null) { + configEnc = configEnc.toUpperCase(); if (!pageDirEnc.equals(configEnc) && (!pageDirEnc.startsWith("UTF-16") || !configEnc .startsWith("UTF-16"))) {