Browse Source

BR 51161:

- don't close System.in otherwise it won't be readable anymore


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1151269 13f79535-47bb-0310-9956-ffa450edef68
master
Nicolas Lalevee 14 years ago
parent
commit
38700692d4
2 changed files with 6 additions and 1 deletions
  1. +4
    -0
      WHATSNEW
  2. +2
    -1
      src/main/org/apache/tools/ant/input/DefaultInputHandler.java

+ 4
- 0
WHATSNEW View File

@@ -63,6 +63,10 @@ Fixed bugs:
with failonerror=false, so warnings won't get logged
Bugzilla Report 48789.

* System.in was closed and not readable anymore by the DefaultInputHandler
when Ant is used via its Java API.
Bugzilla Report 51161

Other changes:
--------------



+ 2
- 1
src/main/org/apache/tools/ant/input/DefaultInputHandler.java View File

@@ -24,6 +24,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Enumeration;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.util.KeepAliveInputStream;

/**
* Prompts on System.err, reads input from System.in
@@ -118,6 +119,6 @@ public class DefaultInputHandler implements InputHandler {
* @return the input stream from which the user input should be read.
*/
protected InputStream getInputStream() {
return System.in;
return KeepAliveInputStream.wrapSystemIn();
}
}

Loading…
Cancel
Save