Browse Source

Revert commit #1095768 on java.xml and fix the redirector to not funnel streams if there is an errorProperty set

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1097261 13f79535-47bb-0310-9956-ffa450edef68
master
Nicolas Lalevee 14 years ago
parent
commit
f60db19864
2 changed files with 5 additions and 5 deletions
  1. +4
    -4
      src/etc/testcases/taskdefs/java.xml
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Redirector.java

+ 4
- 4
src/etc/testcases/taskdefs/java.xml View File

@@ -208,11 +208,11 @@
<loadfile property="redirect.out.contents" srcfile="${outfile}" /> <loadfile property="redirect.out.contents" srcfile="${outfile}" />


<condition property="r1file"> <condition property="r1file">
<equals arg1="${redirect.out.contents}" arg2="foo${line.separator}" />
<equals arg1="${redirect.out.contents}" arg2="foo" />
</condition> </condition>


<fail unless="r1file">${outfile}: <fail unless="r1file">${outfile}:
&quot;${redirect.out.contents}&quot; expected &quot;foo&#010;&quot;</fail>
&quot;${redirect.out.contents}&quot; expected &quot;foo&quot;</fail>


<condition property="r1prop"> <condition property="r1prop">
<equals arg1="${redirect.err}" arg2="" /> <equals arg1="${redirect.err}" arg2="" />
@@ -248,11 +248,11 @@ redirect.err=&quot;${redirect.err}&quot; should be empty</fail>
<loadfile property="redirect.out.contents2" srcfile="${outfile}" /> <loadfile property="redirect.out.contents2" srcfile="${outfile}" />


<condition property="r2file"> <condition property="r2file">
<equals arg1="${redirect.out.contents2}" arg2="foo${line.separator}bar${line.separator}" />
<equals arg1="${redirect.out.contents2}" arg2="foobar" />
</condition> </condition>


<fail unless="r2file">${outfile}: <fail unless="r2file">${outfile}:
&quot;${redirect.out.contents2}&quot; expected &quot;foo&#010;bar&#010;&quot;</fail>
&quot;${redirect.out.contents2}&quot; expected &quot;foobar&quot;</fail>


<condition property="r2prop"> <condition property="r2prop">
<!-- property should not change --> <!-- property should not change -->


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Redirector.java View File

@@ -717,7 +717,7 @@ public class Redirector {
.toString(); .toString();
errorStream = foldFiles(error, logHead, Project.MSG_VERBOSE, errorStream = foldFiles(error, logHead, Project.MSG_VERBOSE,
appendErr, createEmptyFilesErr); appendErr, createEmptyFilesErr);
} else if (!(logError || outputStream == null)) {
} else if (!(logError || outputStream == null) && errorProperty == null) {
long funnelTimeout = 0L; long funnelTimeout = 0L;
OutputStreamFunneler funneler = new OutputStreamFunneler( OutputStreamFunneler funneler = new OutputStreamFunneler(
outputStream, funnelTimeout); outputStream, funnelTimeout);


Loading…
Cancel
Save