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] New: - copy with filtering modifies lineendings
Date Fri, 28 Mar 2003 18:15: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

           Summary: copy with filtering modifies lineendings
           Product: Ant
           Version: 1.6Alpha (nightly)
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: peter.reilly@corvil.com


When copy is used with filtering, the line
endings get modified from the line endings
in the file to the native line endings.
Also, if a file does not end with a line
ending, one is added by the task.

This behaviour is tested by unit test:
.testcases/org.apache.tools.ant.taskdefs#testFilterChain.

I can (sort of) understand the reason when using
filter sets, also this behaviour has been present
since filterchains were added in 2001, so it should
not be changed for filter sets.

However for filter chains (and for different
encodings), I think that the code
should retain the line endings.

I am included a patch to do this, tested locally
but not with the different encodings.

To do the same for filtersets would involve
coping the algorithm from taskdefs.optional.ReplaceRegExp.

Mime
View raw message