From cd8d94c10159d2a83716f36363ed71a5a9077644 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 26 Feb 2003 12:33:01 +0000 Subject: [PATCH] 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 --- .../org/apache/tools/ant/input/DefaultInputHandler.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/org/apache/tools/ant/input/DefaultInputHandler.java b/src/main/org/apache/tools/ant/input/DefaultInputHandler.java index 0936daefd..32cbff47a 100644 --- a/src/main/org/apache/tools/ant/input/DefaultInputHandler.java +++ b/src/main/org/apache/tools/ant/input/DefaultInputHandler.java @@ -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 {