Forward-port: Remove PathSelector include-based directory pre-filtering optimization - #12624
Conversation
The optimization was producing false negatives. It is safe to use an exclude filter for directories during FileVisitor traversal, but unsafe to use an include filter because parent directories need to be traversed first before matching children. PR: #12623 Author: Martin Desruisseaux (@desruisseaux) Closes #12623
gnodet
left a comment
There was a problem hiding this comment.
✅ LGTM — Clean forward-port
This is a verified clean forward-port of #12623 from maven-4.0.x to master. The diffs are byte-for-byte identical, the cherry-pick applied with no conflicts, and the language nits noted in the original review were already addressed before merge.
The change correctly removes the unsafe include-based directory pre-filtering optimization from DirectoryPrefiltering, retaining only exclude-based filtering which is safe. Test assertions are correctly flipped to reflect the new (more permissive) directory matching behavior, with clear explanatory comments.
Note: Cannot submit as APPROVE on self-authored PRs. This review would be APPROVE otherwise.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
|
@gnodet Please assign appropriate label to PR according to the type of change. |
Summary
Forward-port of #12623 from
maven-4.0.xtomaster.Removes the unsafe include-based directory pre-filtering optimization from
PathSelector.DirectoryPrefiltering. Using exclude filters for directory traversal is safe, but using include filters causes false negatives because parent directories need to be traversed before matching children.Cherry-pick applied cleanly with no conflicts.
Author: Martin Desruisseaux (@desruisseaux)
🤖 Generated with Claude Code