Skip to content

Port the FileUtils and translateCommandline fixes to 3.x - #355

Merged
slachiewicz merged 5 commits into
plexus-utils-3.xfrom
agent/port-fixes-3x
Nov 14, 2026
Merged

slachiewicz merged 5 commits into
plexus-utils-3.xfrom
agent/port-fixes-3x

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Cherry-picks #348, #349, #350 and #352 from master for 3.6.3. #351 (stdin polling) stays on master as a feature. The only conflict was an import in FileUtilsTest.

Verified: mvn verify (JDK 17) → 465 tests, 0 failures, 7 skipped

slachiewicz and others added 5 commits November 15, 2026 00:09
…re and cleanDirectoryOnExit

File.listFiles() returns null when a directory cannot be read; both
methods dereferenced it and failed with a NullPointerException that
named nothing. cleanDirectory already checks for null.

(cherry picked from commit 30d3090)
Retry with System.gc() and a sleep only for files that still exist after
a failed delete, so deleting an absent file no longer pays that cost on
Windows. Files.deleteIfExists also removes dangling symlinks.

(cherry picked from commit 2eda606)
Windows stops reporting a file link as a symlink once its target is
deleted, so the precondition of the test, not the fix, failed there.

(cherry picked from commit 44a05db)
forceDeleteOnExit recursed through File.isDirectory(), which follows
symbolic links, so a link to a directory outside the tree got every
file under its target scheduled for deletion on exit. deleteDirectory
did the same on its fallback path when the link itself could not be
removed. Skip the recursion for symbolic links in both places.

(cherry picked from commit bd96367)
@slachiewicz slachiewicz added the bug Something isn't working label Nov 14, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review November 14, 2026 23:13
@slachiewicz
slachiewicz merged commit 62a4cb3 into plexus-utils-3.x Nov 14, 2026
13 checks passed
@slachiewicz
slachiewicz deleted the agent/port-fixes-3x branch November 14, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants