From 1fc1d8df88c4be67fd7511c71a4a696a8b75b961 Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 22 Dec 2009 21:17:41 +0000 Subject: [PATCH] Fix regression (JSP TCK failure) with fix for bug 47453 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@893321 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/jasper/compiler/Validator.java | 8 ++++++++ java/org/apache/jasper/resources/LocalStrings.properties | 1 + 2 files changed, 9 insertions(+) diff --git a/java/org/apache/jasper/compiler/Validator.java b/java/org/apache/jasper/compiler/Validator.java index 7f20017cf..f9035e80b 100644 --- a/java/org/apache/jasper/compiler/Validator.java +++ b/java/org/apache/jasper/compiler/Validator.java @@ -1134,6 +1134,14 @@ class Validator { } else { expectedType = "java.lang.Object"; } + if ("void".equals(expectedType)) { + // Can't specify a literal for a + // deferred method with an expected type + // of void - JSP.2.3.4 + err.jspError(n, + "jsp.error.literal_with_void", + tldAttrs[j].getName()); + } } if (tldAttrs[j].isDeferredValue()) { // The String literal must be castable to what is declared as type diff --git a/java/org/apache/jasper/resources/LocalStrings.properties b/java/org/apache/jasper/resources/LocalStrings.properties index 168c4eece..26677be80 100644 --- a/java/org/apache/jasper/resources/LocalStrings.properties +++ b/java/org/apache/jasper/resources/LocalStrings.properties @@ -351,6 +351,7 @@ jsp.error.fragmentWithDeclareOrScope=Both 'fragment' and 'declare' or 'scope' at jsp.error.var_and_varReader=Only one of \'var\' or \'varReader\' may be specified jsp.error.missing_var_or_varReader=Missing \'var\' or \'varReader\' attribute jsp.warning.bad.urlpattern.propertygroup=Bad value {0} in the url-pattern subelement in web.xml +jsp.error.literal_with_void=A literal value was specified for attribute {0} that is defined as a deferred method with a return type of void. JSP.2.3.4 does not permit literal values in this case jsp.error.unknown_attribute_type=Unknown attribute type ({1}) for attribute {0}. jsp.error.coerce_to_type=Cannot coerce value ({2}) to type ({1}) for attribute {0}. jsp.error.jspelement.missing.name=Mandatory XML-style \'name\' attribute missing -- 2.11.0