Github user bodewig commented on a diff in the pull request:

    https://github.com/apache/ant/pull/37#discussion_r141578555
  
    --- Diff: src/main/org/apache/tools/ant/util/ResourceUtils.java ---
    @@ -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 `resource.as(FileProvider.class)` 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to