Return-Path: Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 59766 invoked by uid 500); 27 Aug 2003 06:38:55 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 59685 invoked from network); 27 Aug 2003 06:38:54 -0000 Received: from unknown (HELO dnsinet.rzf-nrw.de) (193.109.238.66) by daedalus.apache.org with SMTP; 27 Aug 2003 06:38:54 -0000 Received: from z011104.bk.fin.local (z011104.bk.fin.local [193.109.238.140]) by dnsinet.rzf-nrw.de (8.12.9/8.12.9) with ESMTP id h7R5Zqg8019883 for ; Wed, 27 Aug 2003 07:35:53 +0200 Received: by z011104.bk.fin.local with Internet Mail Service (5.5.2653.19) id ; Wed, 27 Aug 2003 07:35:53 +0200 Message-ID: <879A5AD5DD0ED511891F0003473A9B5608FF6E4F@Z011004> From: Jan.Materne@rzf.fin-nrw.de To: dev@ant.apache.org Subject: org. ... ant.Main:508: System.setErr() with wrong argument Date: Wed, 27 Aug 2003 07:35:53 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N In Ant=B4s CLI class "Main" on line 508 is written: if (logTo !=3D null) { out =3D logTo; err =3D logTo; System.setOut(out); System.setErr(out); } logTo is set before while handling the cli argument "-logfile" as PrintStream.=20 1) we use the long form like present, so replace the last statement: if (logTo !=3D null) { out =3D logTo; err =3D logTo; System.setOut(out); System.setErr(err); // <---- err instead out } 2) because out and err are set to the same if (logTo !=3D null) { System.setOut(logTo); System.setErr(logTo); } I prefer the first one because there is more documented. Jan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org