Browse Source

Better redirect stderr and stdout instead of stderr twice.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268111 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
2b0355c521
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/Javac.java

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

@@ -515,7 +515,7 @@ public class Javac extends MatchingTask {
try { try {
PrintStream logstr = PrintStream logstr =
new PrintStream(new LogOutputStream(this, Project.MSG_WARN)); new PrintStream(new LogOutputStream(this, Project.MSG_WARN));
System.setErr(logstr);
System.setOut(logstr);
System.setErr(logstr); System.setErr(logstr);
Class c = Class.forName ("com.sun.tools.javac.Main"); Class c = Class.forName ("com.sun.tools.javac.Main");
Object compiler = c.newInstance (); Object compiler = c.newInstance ();
@@ -533,7 +533,7 @@ public class Javac extends MatchingTask {
throw new BuildException("Error starting modern compiler", ex, location); throw new BuildException("Error starting modern compiler", ex, location);
} }
} finally { } finally {
System.setErr(err);
System.setOut(err);
System.setErr(out); System.setErr(out);
} }
} }


Loading…
Cancel
Save