ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18476] - copy with filtering modifies lineendings
Date Fri, 18 Apr 2003 21:47:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18476>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18476

copy with filtering modifies lineendings





------- Additional Comments From peter.reilly@corvil.com  2003-04-18 21:47 -------
I have made a patch to modify head and tail filter to use linetokenizer
from tokenfilter. LineTokenizer tokenizes files using  \r, \n or \r\n, so
it should work with dos, unix and mac for head and tail filter.
Make a change to linetokenizer to optionally include the lineending with
the line. Made a similar change to stringtokenizer.
Also when head and tail filters where used a filterreader
with paramaters, only the first parameter was used.

The head and tail tests now pass on linux, but I have not tested on
dos (or mac).

This patch is in addition to 5850 and 5851.

The changes are:
docs/manual/CoreTypes/filterchain.html:
   document new attribute to linetokenizer and to stringtokenizer
src/etc/testcases/filters/input/head-tail.test
   add a new line to end of file
src/main/org/apache/tools/ant/filters/HeadFilter.java
   use linetokenizer
   use all parameters
src/main/org/apache/tools/ant/filters/TailFilter.java
   use linetokenizer
   use all parameters
src/main/org/apache/tools/ant/filters/TokenFilter.java
   add includeDelims attribute to linetokenizer and to stringtokenizer
src/testcases/org/apache/tools/ant/filters/HeadTailTest.java
   add tests to test use of filterreader with head and tail filter

Peter

Mime
View raw message