Author: violetagg
Date: Tue May 27 17:51:17 2014
New Revision: 1597837
URL: http://svn.apache.org/r1597837
Log:
Merged revision 1597532 from tomcat/trunk:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56561
Fixed NoSuchElementException when an attribute has empty string as value.
Modified:
tomcat/tc6.0.x/trunk/ (props changed)
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc6.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1597532
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1597837&r1=1597836&r2=1597837&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue May 27 17:51:17 2014
@@ -27,11 +27,6 @@ None
PATCHES PROPOSED TO BACKPORT:
[ New proposals should be added at the end of the list ]
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56561
- Fixed NoSuchElementException when an attribute has empty string as value
- http://svn.apache.org/viewvc?view=revision&revision=1597532
- +1 violetagg, kkolinko, markt
- -1
PATCHES/ISSUES THAT ARE STALLED:
Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java?rev=1597837&r1=1597836&r2=1597837&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java Tue May
27 17:51:17 2014
@@ -1327,8 +1327,12 @@ class Validator {
} else {
// Get text with \$ and \# escaping removed.
// Should be a single Text node
- value = ((ELNode.Text) el.iterator().next())
- .getText();
+ Iterator<ELNode> it = el.iterator();
+ if (it.hasNext()) {
+ value = ((ELNode.Text) it.next()).getText();
+ } else {
+ value = "";
+ }
el = null;
}
}
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1597837&r1=1597836&r2=1597837&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Tue May 27 17:51:17 2014
@@ -43,6 +43,16 @@
<!-- Section names:
General, Catalina, Coyote, Jasper, Cluster, Web applications, Other
-->
+<section name="Tomcat 6.0.42 (markt)">
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>56561</bug>: Avoid <code>NoSuchElementException</code> while
+ handling attributes with empty string value. (violetagg)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
<section name="Tomcat 6.0.41 (markt)" rtext="released 2014-05-23">
<subsection name="Jasper">
<changelog>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]