Browse Source

make the flush of the error stream actually flush

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@958704 13f79535-47bb-0310-9956-ffa450edef68
master
Nicolas Lalevee 15 years ago
parent
commit
74f2e55f3c
3 changed files with 4 additions and 3 deletions
  1. +2
    -2
      src/main/org/apache/tools/ant/UnknownElement.java
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Java.java
  3. +1
    -0
      src/main/org/apache/tools/ant/taskdefs/Redirector.java

+ 2
- 2
src/main/org/apache/tools/ant/UnknownElement.java View File

@@ -269,9 +269,9 @@ public class UnknownElement extends Task {
*/ */
protected void handleErrorFlush(String output) { protected void handleErrorFlush(String output) {
if (realThing instanceof Task) { if (realThing instanceof Task) {
((Task) realThing).handleErrorOutput(output);
((Task) realThing).handleErrorFlush(output);
} else { } else {
super.handleErrorOutput(output);
super.handleErrorFlush(output);
} }
} }




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

@@ -732,7 +732,7 @@ public class Java extends Task {
if (redirector.getErrorStream() != null) { if (redirector.getErrorStream() != null) {
redirector.handleErrorFlush(output); redirector.handleErrorFlush(output);
} else { } else {
super.handleErrorOutput(output);
super.handleErrorFlush(output);
} }
} }




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

@@ -843,6 +843,7 @@ public class Redirector {
errorPrintStream = new PrintStream(errorStream); errorPrintStream = new PrintStream(errorStream);
} }
errorPrintStream.print(output); errorPrintStream.print(output);
errorPrintStream.flush();
} }
} }




Loading…
Cancel
Save