Browse Source

Avoid to read mor from System.in than necessary.

PR: 17396


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274185 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
cd8d94c101
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      src/main/org/apache/tools/ant/input/DefaultInputHandler.java

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

@@ -54,10 +54,9 @@

package org.apache.tools.ant.input;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Enumeration;
import org.apache.tools.ant.BuildException;

@@ -82,8 +81,7 @@ public class DefaultInputHandler implements InputHandler {
*/
public void handleInput(InputRequest request) throws BuildException {
String prompt = getPrompt(request);
BufferedReader in =
new BufferedReader(new InputStreamReader(getInputStream()));
DataInputStream in = new DataInputStream(getInputStream());
do {
System.err.println(prompt);
try {


Loading…
Cancel
Save