Repository navigation
Port the FileUtils and translateCommandline fixes to 3.x - #355
Merged
Merged
Conversation
…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)
(cherry picked from commit ba90392)
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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