elharo opened a new issue, #511:
URL: https://github.com/apache/maven-ear-plugin/issues/511

   ## Description
   
   In `EarMojo.java:642-644`, the `isNonFilteredExtension()` method has a 
double-negation bug:
   
   ```java
   public boolean isNonFilteredExtension(String fileName) {
       return !mavenResourcesFiltering.filteredFileExtension(fileName, 
nonFilteredFileExtensions);
   }
   ```
   
   `MavenResourcesFiltering.filteredFileExtension()` returns `true` when the 
file extension *is in the non-filtered list* (meaning the file should **not** 
be filtered). The `!` inverts this, so the method returns `false` for 
non-filtered files and `true` for files that should be filtered.
   
   At `EarMojo.java:622`:
   ```java
   if (filtering && !isNonFilteredExtension(source.getName())) {
   ```
   
   The double negation means:
   - Files with non-filtered extensions (e.g., `.xml`) enter the filter branch 
and get incorrectly modified
   - Files without non-filtered extensions skip filtering when they should be 
filtered
   
   ## Expected behavior
   
   Remove the `!` negation:
   
   ```java
   public boolean isNonFilteredExtension(String fileName) {
       return mavenResourcesFiltering.filteredFileExtension(fileName, 
nonFilteredFileExtensions);
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to