You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2011/04/28 00:14:04 UTC
svn commit: r1097261 - in /ant/core/trunk/src:
etc/testcases/taskdefs/java.xml
main/org/apache/tools/ant/taskdefs/Redirector.java
Author: hibou
Date: Wed Apr 27 22:14:03 2011
New Revision: 1097261
URL: http://svn.apache.org/viewvc?rev=1097261&view=rev
Log:
Revert commit #1095768 on java.xml and fix the redirector to not funnel streams if there is an errorProperty set
Modified:
ant/core/trunk/src/etc/testcases/taskdefs/java.xml
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Redirector.java
Modified: ant/core/trunk/src/etc/testcases/taskdefs/java.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/java.xml?rev=1097261&r1=1097260&r2=1097261&view=diff
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/java.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/java.xml Wed Apr 27 22:14:03 2011
@@ -208,11 +208,11 @@
<loadfile property="redirect.out.contents" srcfile="${outfile}" />
<condition property="r1file">
- <equals arg1="${redirect.out.contents}" arg2="foo${line.separator}" />
+ <equals arg1="${redirect.out.contents}" arg2="foo" />
</condition>
<fail unless="r1file">${outfile}:
-"${redirect.out.contents}" expected "foo
"</fail>
+"${redirect.out.contents}" expected "foo"</fail>
<condition property="r1prop">
<equals arg1="${redirect.err}" arg2="" />
@@ -248,11 +248,11 @@ redirect.err="${redirect.err}"
<loadfile property="redirect.out.contents2" srcfile="${outfile}" />
<condition property="r2file">
- <equals arg1="${redirect.out.contents2}" arg2="foo${line.separator}bar${line.separator}" />
+ <equals arg1="${redirect.out.contents2}" arg2="foobar" />
</condition>
<fail unless="r2file">${outfile}:
-"${redirect.out.contents2}" expected "foo
bar
"</fail>
+"${redirect.out.contents2}" expected "foobar"</fail>
<condition property="r2prop">
<!-- property should not change -->
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Redirector.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Redirector.java?rev=1097261&r1=1097260&r2=1097261&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Redirector.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Redirector.java Wed Apr 27 22:14:03 2011
@@ -717,7 +717,7 @@ public class Redirector {
.toString();
errorStream = foldFiles(error, logHead, Project.MSG_VERBOSE,
appendErr, createEmptyFilesErr);
- } else if (!(logError || outputStream == null)) {
+ } else if (!(logError || outputStream == null) && errorProperty == null) {
long funnelTimeout = 0L;
OutputStreamFunneler funneler = new OutputStreamFunneler(
outputStream, funnelTimeout);