Return-Path: Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 52855 invoked by uid 500); 17 Jul 2003 12:48:20 -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 52844 invoked from network); 17 Jul 2003 12:48:19 -0000 Received: from relay.t-intra.de (HELO relay.t-online-com.de) (62.156.147.74) by daedalus.apache.org with SMTP; 17 Jul 2003 12:48:19 -0000 Received: from DJ0X820J (p5080e83d.dip0.t-ipconnect.de [80.128.232.61]) by relay.t-online-com.de (SMTPSVC(1.0.0.2)) with ESMTP id 631F514CA66 for ; Thu, 17 Jul 2003 16:48:12 +0200 (CEST) Message-ID: <002701c34c61$dc76d5a0$020200c0@DJ0X820J> From: "Antoine Levy-Lambert" To: "Ant Developers List" References: <20030717102017.12841.qmail@icarus.apache.org> <200307172108.17457.conor@cortexebusiness.com.au> Subject: Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs DefaultExcludesTest.java DemuxOutputTask.java Date: Thu, 17 Jul 2003 14:49:28 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Conor, I am +1 on your changes. > The Ant output handling now will pass every character through to the > generating task without inserting line breaks at buffer full intervals. Also > line breaks will not be converted to the platform line separator. > > So, if a java application running on Windows writes \n and not \r\n, the > output stream that gets redirected to an ouput file will not have \n\r. It's > not a big deal I think since the generating application should be in control > - it may really want to generate a Unix format output. > This is like changes which have been done to FileUtils#copyFile(File sourceFile, File destFile, FilterSetCollection filters, Vector filterChains, boolean overwrite, boolean preserveLastModified, String inputEncoding, String outputEncoding, Project project) by Peter Reilly and then a little bit by myself to make sure that line endings are not changed by FilterSets or FilterChains. The class TokenFilter.LineTokenizer (written by Peter Reilly) is the tool which allows to read input line by line including the original line ending. Actually, I wonder whether this class (LineTokenizer) should not be in its own .java file to give it more visibility. Suggestion about the appropriate package ( org.apache.tools.ant.util ?) and name (I think LineTokenizer is very expressive, I would retain this). Since it is new from 1.6, we can refactor this without breaking compat. The optional task is not yet using this tokenizer, I am planning to change it too. Then we can say that the general Ant philosophy in tasks or types manipulating files or streams is to preserve line endings (except of course whose job is to change line endings). Antoine --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org