tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1003891 - /tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
Date Sat, 02 Oct 2010 21:14:38 GMT
Author: markt
Date: Sat Oct  2 21:14:37 2010
New Revision: 1003891

URL: http://svn.apache.org/viewvc?rev=1003891&view=rev
Log:
Fix NPE and TCK failures caused by previous fix for bug 49799.

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/Generator.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Generator.java?rev=1003891&r1=1003890&r2=1003891&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Generator.java Sat Oct  2 21:14:37 2010
@@ -1868,9 +1868,14 @@ class Generator {
                 if (attrs[i].isNamedAttribute()) {
                     NamedAttribute attr = attrs[i].getNamedAttributeNode();
                     Node.JspAttribute omitAttr = attr.getOmit();
-                    String omit = attributeValue(omitAttr, false, boolean.class);
-                    if ("true".equals(omit)) {
-                        continue;
+                    String omit;
+                    if (omitAttr == null) {
+                        omit = "false";
+                    } else {
+                        omit = attributeValue(omitAttr, false, boolean.class);
+                        if ("true".equals(omit)) {
+                            continue;
+                        }
                     }
                     value = generateNamedAttributeValue(
                             attrs[i].getNamedAttributeNode());
@@ -1878,8 +1883,9 @@ class Generator {
                         nvp = " + \" " + attrs[i].getName() + "=\\\"\" + " +
                                 value + " + \"\\\"\"";
                     } else {
-                        nvp = " + (Boolean.valueOf(" + omit + ")?\"\":\" " + attrs[i].getName()
+
-                                "=\\\"\" + " + value + " + \"\\\"\")";
+                        nvp = " + (Boolean.valueOf(" + omit + ")?\"\":\" " +
+                                attrs[i].getName() + "=\\\"\" + " + value +
+                                " + \"\\\"\")";
                     }
                 } else {
                     value = attributeValue(attrs[i], false, Object.class);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message