Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 56144 invoked from network); 19 Jul 2002 18:57:51 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 19 Jul 2002 18:57:51 -0000 Received: (qmail 29307 invoked by uid 97); 19 Jul 2002 18:58:08 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 29267 invoked by uid 97); 19 Jul 2002 18:58:07 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 29256 invoked by uid 97); 19 Jul 2002 18:58:07 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: 19 Jul 2002 18:57:44 -0000 Message-ID: <20020719185744.55050.qmail@icarus.apache.org> From: patrickl@apache.org To: jakarta-commons-sandbox-cvs@apache.org Subject: cvs commit: jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher LaunchCommand.java ParentListener.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N patrickl 2002/07/19 11:57:44 Modified: daemon/src/java/org/apache/commons/launcher LaunchCommand.java ParentListener.java Log: Fix regression bug introduced in previous commit. Revision Changes Path 1.2 +2 -2 jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher/LaunchCommand.java Index: LaunchCommand.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher/LaunchCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- LaunchCommand.java 19 Jul 2002 08:05:11 -0000 1.1 +++ LaunchCommand.java 19 Jul 2002 18:57:44 -0000 1.2 @@ -444,9 +444,9 @@ /** * Set the list of nested sysproperty elements. * - * @param props a map of {@link String} objects + * @param sysProperties a map of {@link String} objects */ - public void setSysproperties(HashMap props) { + public void setSysproperties(HashMap sysProperties) { this.sysProperties = sysProperties; 1.2 +8 -5 jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher/ParentListener.java Index: ParentListener.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher/ParentListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ParentListener.java 10 Jul 2002 05:27:52 -0000 1.1 +++ ParentListener.java 19 Jul 2002 18:57:44 -0000 1.2 @@ -58,6 +58,7 @@ package org.apache.commons.launcher; import java.io.File; +import java.io.InputStream; import java.io.IOException; /** @@ -140,22 +141,24 @@ } else { + // Cache System.in in case the application redirects + InputStream is = System.in; int bytesAvailable = 0; int bytesRead = 0; byte[] buf = new byte[1024]; try { while (true) { - synchronized (System.in) { + synchronized (is) { // Mark the stream position so that other threads can // reread the strea - System.in.mark(buf.length); + is.mark(buf.length); // Read one more byte than has already been read to // force the stream to wait for input - bytesAvailable = System.in.available(); + bytesAvailable = is.available(); if (bytesAvailable < buf.length) { - bytesRead = System.in.read(buf, 0, bytesAvailable + 1); + bytesRead = is.read(buf, 0, bytesAvailable + 1); // Reset so that we "unread" the bytes that we read - System.in.reset(); + is.reset(); if (bytesRead == -1) break; } else { -- To unsubscribe, e-mail: For additional commands, e-mail: