This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new 6f0573b Remove unnecessary code
6f0573b is described below
commit 6f0573b0f42f00ed23e2c2f44925fc148bfdad5b
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Apr 8 14:50:53 2021 +0100
Remove unnecessary code
If an attribute is not a named attribute then it must appear in an XML
element in the form attributeName="attributeValue". There is no way to
construct such an XML attribute such that the attributeValue is null. I
have also checked all the possible code paths to this method and I could
not find any where an attribute that was not a named attribute could
have a null value.
---
java/org/apache/jasper/compiler/Generator.java | 3 ---
1 file changed, 3 deletions(-)
diff --git a/java/org/apache/jasper/compiler/Generator.java
b/java/org/apache/jasper/compiler/Generator.java
index 07de664..44227d5 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -960,9 +960,6 @@ class Generator {
private String attributeValue(Node.JspAttribute attr, boolean encode,
Class<?> expectedType) {
String v = attr.getValue();
- if (!attr.isNamedAttribute() && (v == null))
- return "";
-
if (attr.isExpression()) {
if (encode) {
return
"org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(String.valueOf("
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]