Review feedback
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 9 Mar 2010 15:01:05 +0000 (15:01 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 9 Mar 2010 15:01:05 +0000 (15:01 +0000)
1. getNameFromAttribute() returns the attribute name, not the variable name and
2. This is a translation time test so the attribute value is not known

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@920907 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/compiler/Generator.java

index d761cf6..1417564 100644 (file)
@@ -1725,11 +1725,10 @@ class Generator {
                 for (int i = 0; i < tagInfos.length; i++) {
                     TagVariableInfo tagInfo = tagInfos[i];
                     if (tagInfo != null) {
-                        String name = tagInfo.getNameFromAttribute();
-                        if (name == null) {
-                            name = tagInfo.getNameGiven();
+                        String name = tagInfo.getNameGiven();
+                        if (name != null) {
+                            pageInfo.getVarInfoNames().add(name);
                         }
-                        pageInfo.getVarInfoNames().add(name);
                     }
                 }
             }