Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags
In directory sc8-pr-cvs1:/tmp/cvs-serv22765
Modified Files:
CompositeTag.java
Log Message:
Fix CompositeTag.toString() which caused java.lang.StackOverflowError for tags of the form <td width="69"/>.
In this case the end tag is 'this' tag which wasn't handled by the output code.
Added testXMLTypeToString() to ParserTest.
Index: CompositeTag.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/CompositeTag.java,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** CompositeTag.java 2 Jan 2004 16:24:54 -0000 1.71
--- CompositeTag.java 19 Jan 2004 22:44:59 -0000 1.72
***************
*** 484,488 ****
}
! if (null != getEndTag ())
// eliminate virtual tags
// if (!(getEndTag ().getStartPosition () == getEndTag ().getEndPosition ()))
--- 484,488 ----
}
! if ((null != getEndTag ()) && (this != getEndTag ())) // 2nd guard handles <tag/>
// eliminate virtual tags
// if (!(getEndTag ().getStartPosition () == getEndTag ().getEndPosition ()))
|