bojan 01/12/18 15:59:25
Modified: src/share/org/apache/tomcat/util/xml XmlMapper.java
Log:
Jochen Wiedmann fix for web.xml that has no DOCTYPE
Revision Changes Path
1.39 +8 -7
jakarta-tomcat/src/share/org/apache/tomcat/util/xml/XmlMapper.java
Index: XmlMapper.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/xml/XmlMapper.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- XmlMapper.java 2001/10/25 01:41:48 1.38
+++ XmlMapper.java 2001/12/18 23:59:25 1.39
@@ -98,13 +98,14 @@
sb.append("/");
for( int i=0; i< sp ; i++ ) sb.append( tagStack[i] ).append( "/" );
sb.append(" ");
- AttributeList attributes=(AttributeList) attributeStack[sp-1];
- if( attributes!=null)
- for (int i = 0; i < attributes.getLength (); i++) {
- sb.append(attributes.getName(i)).append( "="
).append(attributes.getValue(i));
- sb.append(" ");
- }
-
+ if( sp > 0 ) {
+ AttributeList attributes=(AttributeList) attributeStack[sp-1];
+ if( attributes!=null)
+ for (int i = 0; i < attributes.getLength (); i++) {
+ sb.append(attributes.getName(i)).append( "="
).append(attributes.getValue(i));
+ sb.append(" ");
+ }
+ }
return sb.toString();
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>