You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2014/12/26 13:00:55 UTC
[1/2] ant-antlibs-antunit git commit: ignore some build time stuff
Repository: ant-antlibs-antunit
Updated Branches:
refs/heads/master 13ec6e0b1 -> 7396c8b6a
ignore some build time stuff
Project: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/commit/b2ef8c49
Tree: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/tree/b2ef8c49
Diff: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/diff/b2ef8c49
Branch: refs/heads/master
Commit: b2ef8c49bf5c66191959cad755d4d5fff84a95d5
Parents: 13ec6e0
Author: Stefan Bodewig <bo...@apache.org>
Authored: Fri Dec 26 12:50:57 2014 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Fri Dec 26 12:50:57 2014 +0100
----------------------------------------------------------------------
.gitignore | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/blob/b2ef8c49/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4eae741
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/build/
+/docs/style.css
+/ivy/
+/lib/
[2/2] ant-antlibs-antunit git commit: Try to reduce the risk of
StackOverflow/OOM in report Submitted by: Ryan Bennitt Bugzilla:
https://issues.apache.org/bugzilla/show_bug.cgi?id=57341
Posted by bo...@apache.org.
Try to reduce the risk of StackOverflow/OOM in report
Submitted by: Ryan Bennitt
Bugzilla: https://issues.apache.org/bugzilla/show_bug.cgi?id=57341
Project: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/commit/7396c8b6
Tree: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/tree/7396c8b6
Diff: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/diff/7396c8b6
Branch: refs/heads/master
Commit: 7396c8b6a61e0c2ca0d4d17f91627211988674bf
Parents: b2ef8c4
Author: Stefan Bodewig <bo...@apache.org>
Authored: Fri Dec 26 12:55:24 2014 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Fri Dec 26 12:55:42 2014 +0100
----------------------------------------------------------------------
changes.xml | 8 ++++++++
contributors.xml | 4 ++++
src/etc/junit-frames.xsl | 17 +++++++++++++++++
src/etc/junit-noframes.xsl | 17 +++++++++++++++++
4 files changed, 46 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/blob/7396c8b6/changes.xml
----------------------------------------------------------------------
diff --git a/changes.xml b/changes.xml
index c665f93..4e43174 100644
--- a/changes.xml
+++ b/changes.xml
@@ -37,6 +37,14 @@
<title>Apache AntUnit</title>
</properties>
+ <release version="1.4" date="unreleased">
+ <action type="fix" issue="57341">
+ The br-replace template inside the XSLT stylesheets used by
+ for reports could cause stack overflows or out-of-memory errors
+ when applied to big outputs.
+ </action>
+ </release>
+
<release version="1.3" date="2014-05-14">
<action type="add" issue="53383">
New assertion assertRefResourceExists,
http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/blob/7396c8b6/contributors.xml
----------------------------------------------------------------------
diff --git a/contributors.xml b/contributors.xml
index b4a4966..00db496 100644
--- a/contributors.xml
+++ b/contributors.xml
@@ -63,6 +63,10 @@
<last>Reilly</last>
</name>
<name>
+ <first>Ryan</first>
+ <last>Bennitt</last>
+ </name>
+ <name>
<first>Stefan</first>
<last>Bodewig</last>
</name>
http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/blob/7396c8b6/src/etc/junit-frames.xsl
----------------------------------------------------------------------
diff --git a/src/etc/junit-frames.xsl b/src/etc/junit-frames.xsl
index 7c5eb72..8a746e2 100644
--- a/src/etc/junit-frames.xsl
+++ b/src/etc/junit-frames.xsl
@@ -888,7 +888,24 @@ h6 {
-->
<xsl:template name="br-replace">
<xsl:param name="word"/>
+ <xsl:param name="splitlimit">32</xsl:param>
+ <xsl:variable name="secondhalflen" select="(string-length($word)+(string-length($word) mod 2)) div 2"/>
+ <xsl:variable name="secondhalfword" select="substring($word, $secondhalflen)"/>
+ <!-- When word is very big, a recursive replace is very heap/stack expensive, so subdivide on line break after middle of string -->
<xsl:choose>
+ <xsl:when test="(string-length($word) > $splitlimit) and (contains($secondhalfword, '
'))">
+ <xsl:variable name="secondhalfend" select="substring-after($secondhalfword, '
')"/>
+ <xsl:variable name="firsthalflen" select="string-length($word) - $secondhalflen"/>
+ <xsl:variable name="firsthalfword" select="substring($word, 1, $firsthalflen)"/>
+ <xsl:variable name="firsthalfend" select="substring-before($secondhalfword, '
')"/>
+ <xsl:call-template name="br-replace">
+ <xsl:with-param name="word" select="concat($firsthalfword,$firsthalfend)"/>
+ </xsl:call-template>
+ <br/>
+ <xsl:call-template name="br-replace">
+ <xsl:with-param name="word" select="$secondhalfend"/>
+ </xsl:call-template>
+ </xsl:when>
<xsl:when test="contains($word, '
')">
<xsl:value-of select="substring-before($word, '
')"/>
<br/>
http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/blob/7396c8b6/src/etc/junit-noframes.xsl
----------------------------------------------------------------------
diff --git a/src/etc/junit-noframes.xsl b/src/etc/junit-noframes.xsl
index d28cb2c..eb58896 100644
--- a/src/etc/junit-noframes.xsl
+++ b/src/etc/junit-noframes.xsl
@@ -468,7 +468,24 @@ under the License.
-->
<xsl:template name="br-replace">
<xsl:param name="word"/>
+ <xsl:param name="splitlimit">32</xsl:param>
+ <xsl:variable name="secondhalflen" select="(string-length($word)+(string-length($word) mod 2)) div 2"/>
+ <xsl:variable name="secondhalfword" select="substring($word, $secondhalflen)"/>
+ <!-- When word is very big, a recursive replace is very heap/stack expensive, so subdivide on line break after middle of string -->
<xsl:choose>
+ <xsl:when test="(string-length($word) > $splitlimit) and (contains($secondhalfword, '
'))">
+ <xsl:variable name="secondhalfend" select="substring-after($secondhalfword, '
')"/>
+ <xsl:variable name="firsthalflen" select="string-length($word) - $secondhalflen"/>
+ <xsl:variable name="firsthalfword" select="substring($word, 1, $firsthalflen)"/>
+ <xsl:variable name="firsthalfend" select="substring-before($secondhalfword, '
')"/>
+ <xsl:call-template name="br-replace">
+ <xsl:with-param name="word" select="concat($firsthalfword,$firsthalfend)"/>
+ </xsl:call-template>
+ <br/>
+ <xsl:call-template name="br-replace">
+ <xsl:with-param name="word" select="$secondhalfend"/>
+ </xsl:call-template>
+ </xsl:when>
<xsl:when test="contains($word, '
')">
<xsl:value-of select="substring-before($word, '
')"/>
<br/>