sushu0 opened a new pull request, #893: URL: https://github.com/apache/commons-io/pull/893
[IO-754](https://issues.apache.org/jira/browse/IO-754) reports that `FileUtils.iterateFiles()` stopped honoring a `WildcardFileFilter` subclass's `accept(File)` override when traversal switched to the Path entry point in 2.9.0. For example, an override that normalizes file extensions accepts `test2.TXT` when called directly, but traversal silently rejects it. Route default-file-system paths with a file name through `accept(File)`. Keep name-based matching for other file systems, which may not support `Path.toFile()`, and preserve null/root-path behavior. The change is confined to `WildcardFileFilter`; subclasses that override the Path entry point retain their dispatch. Regression tests cover the reported traversal, both acceptance and rejection by a File override, a Path-only override, Jimfs paths, and null/root paths. Validation on Windows / Zulu OpenJDK 21.0.12.1 / Maven 3.9.16: - Before the fix: `mvn -Dtest=WildcardFileFilterTest,FileUtilsListFilesTest test` ran 14 tests, with 2 failures and no errors or skips. - After the fix: the same 14 tests pass, with no failures, errors, or skips. - Default `mvn` completed 6,704 tests: 3 failures, 37 errors, and 40 skips. The 40 failing/error test case names exactly match an unchanged-baseline rerun of the affected 7 classes (368 tests). They are the Google HTTP 429 fixtures and unavailable Windows symlink privileges; there are no additional failing test cases with this patch. The default build therefore fails on this machine. - `mvn checkstyle:check spotbugs:check pmd:check javadoc:javadoc` passes (0 Checkstyle violations; 0 SpotBugs bug instances). - `mvn -DskipTests verify japicmp:cmp` passes: packaging succeeds, all configured JaCoCo coverage checks are met using the full-suite execution data, and the binary compatibility check succeeds. This continuation does not rerun or replace the failed full test invocation. The commands use a task-local Maven settings file for the existing local HTTP proxy. This PR is a draft while hosted CI is pending because the local default build is not fully green. AI disclosure: OpenAI Codex generated the investigation, implementation, regression tests, and PR text, and ran the reported checks. The commit includes a `Generated-by: OpenAI Codex` trailer. - [x] Read the contribution guidelines for this project. - [x] Read the ASF Generative Tooling Guidance. - [x] I used AI to create any part of, or all of, this pull request; the tool and extent are disclosed above. - [ ] Run a successful build using the default Maven goal. - [x] Write regression tests that fail without the runtime change. - [x] Write a description explaining what, how, and why. - [x] Use a meaningful commit message containing the Jira issue key. -- 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]
