You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/05/07 10:46:57 UTC
[tomcat] branch 9.0.x updated (9ba1ca6 -> 124c513)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.
from 9ba1ca6 Improvements to Chinese translations. Provided by bytesgo.
new a6eaeaa Remove unnecessary code
new 124c513 Remove unnecessary code (EL can't be null here)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
java/org/apache/jasper/compiler/Generator.java | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 01/02: Remove unnecessary code
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit a6eaeaa4d6742b6af4f988c5ed0edc1978efe217
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu May 6 17:37:19 2021 +0100
Remove unnecessary code
If an attribute value is null, it must be a named attribute.
---
java/org/apache/jasper/compiler/Generator.java | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java
index 860aeb9..82238c9 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -2995,17 +2995,14 @@ class Generator {
String attrValue = attr.getValue();
if (attrValue == null) {
- if (attr.isNamedAttribute()) {
- if (n.checkIfAttributeIsJspFragment(attr.getName())) {
- // XXX - no need to generate temporary variable here
- attrValue = generateNamedAttributeJspFragment(attr
- .getNamedAttributeNode(), tagHandlerVar);
- } else {
- attrValue = generateNamedAttributeValue(attr
- .getNamedAttributeNode());
- }
+ // Must be a named attribute
+ if (n.checkIfAttributeIsJspFragment(attr.getName())) {
+ // XXX - no need to generate temporary variable here
+ attrValue = generateNamedAttributeJspFragment(attr
+ .getNamedAttributeNode(), tagHandlerVar);
} else {
- return null;
+ attrValue = generateNamedAttributeValue(attr
+ .getNamedAttributeNode());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 02/02: Remove unnecessary code (EL can't be null here)
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 124c51389eec9c6a496e15b23b2626af9dbee15b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu May 6 22:33:29 2021 +0100
Remove unnecessary code (EL can't be null here)
---
java/org/apache/jasper/compiler/Generator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java
index 82238c9..762bb68 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -3123,9 +3123,9 @@ class Generator {
sb.append("}))");
attrValue = sb.toString();
} else {
+ // Must be EL
// run attrValue through the expression interpreter
- String mapName = (attr.getEL() != null) ? attr.getEL()
- .getMapName() : null;
+ String mapName = attr.getEL().getMapName();
attrValue = elInterpreter.interpreterCall(ctxt,
this.isTagFile, attrValue, c[0], mapName);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org