DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24799>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24799 junitreport stylesheet causes StackOverflow with big replacements Summary: junitreport stylesheet causes StackOverflow with big replacements Product: Ant Version: 1.5.1 Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: Other Component: Optional Tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have several unit tests that set enormous java.class.path environment variables. On Windows machines, the XSL stylesheets for junitreport run this block: <xsl:when test="contains($string,'\')"> <xsl:value-of select="substring-before($string,'\')"/>\\<xsl:call-template name="JS-escape"> <xsl:with-param name="string" select="substring-after($string,'\')"/> </xsl:call-template> </xsl:when> This causes a very deep recursion, which even a -Xss12m can't handle. My current work-around for the JS-escape template replaces the above condition with: <xsl:when test="contains($string,'\')"> <xsl:choose> <xsl:when test="string-length($string) > 100"> <xsl:call-template name="JS-escape"> <xsl:with-param name="string" select="translate($string,'\','/')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="substring-before($string,'\')"/>\\<xsl:call-template name="JS-escape"> <xsl:with-param name="string" select="substring-after($string,'\')"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:when> Which, though isn't a perfect translation, works. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]