Fix regression (JSP TCK failure) with fix for bug 47453
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 22 Dec 2009 21:17:41 +0000 (21:17 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 22 Dec 2009 21:17:41 +0000 (21:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@893321 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/compiler/Validator.java
java/org/apache/jasper/resources/LocalStrings.properties

index 7f20017..f9035e8 100644 (file)
@@ -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
index 168c4ee..26677be 100644 (file)
@@ -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