ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bodewig <>
Subject [GitHub] ant pull request #37: [1.9.x branch] BZ-60644 Fix file corruption during cop...
Date Thu, 28 Sep 2017 10:15:37 GMT
Github user bodewig commented on a diff in the pull request:
    --- Diff: src/main/org/apache/tools/ant/util/ ---
    @@ -666,6 +666,14 @@ private static void copyWithFilterSets(final Resource source, final
Resource des
                                                final String outputEncoding,
                                                final Project project)
             throws IOException {
    +        if (source instanceof FileResource && dest instanceof FileResource) {
    --- End diff --
    I think it would be better to use `FileProvider` rather than `FileResource` here (and
in the next blocks). Actually I'd probably move the `instanceof` checks into `areSame` (and
replace them with `` there. This allows for other resources
that know they are working on files and removes at least one line of duplicate code per `if`
block :-)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message