Skip to content

Commit

Permalink
PathUtils.deleteOnExit(Path) calls Objects.requireNonNull() on the wrong
Browse files Browse the repository at this point in the history
object
  • Loading branch information
garydgregory committed May 3, 2024
1 parent 4b10ee6 commit 0989442
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ The <action> type attribute can be add,update,fix,remove.
<!-- FIX -->
<action dev="ggregory" type="fix" due-to="Dependabot">Add missing unit tests.</action>
<action dev="ggregory" type="fix" due-to="Dependabot">FileUtils.lastModifiedFileTime(File) calls Objects.requireNonNull() on the wrong object.</action>
<action dev="ggregory" type="fix" due-to="Dependabot">PathUtils.deleteOnExit(Path) calls Objects.requireNonNull() on the wrong object.</action>
<!-- UPDATE -->
<action dev="ggregory" type="update" due-to="Dependabot">Bump tests commons.bytebuddy.version from 1.14.13 to 1.14.14 #615.</action>
<action dev="ggregory" type="update" due-to="Dependabot">Bump tests commons-codec:commons-codec from 1.16.1 to 1.17.0.</action>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/io/file/PathUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ public static PathCounters deleteFile(final Path file, final LinkOption[] linkOp
* @since 3.13.0
*/
public static void deleteOnExit(final Path path) {
Objects.requireNonNull(path.toFile()).deleteOnExit();
Objects.requireNonNull(path).toFile().deleteOnExit();
}

/**
Expand Down

0 comments on commit 0989442

Please sign in to comment.