From c52a7461859bf54bb06e5f73cbacca30caadb461 Mon Sep 17 00:00:00 2001 From: markt Date: Fri, 16 May 2008 17:46:34 +0000 Subject: [PATCH] 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 --- java/org/apache/jasper/compiler/Validator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"))) { -- 2.11.0