This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new a66a125 No need to check if the directory already exists.
a66a125 is described below
commit a66a1253fb64b429608ddba8461d185920f360c5
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Jan 26 09:54:21 2021 -0500
No need to check if the directory already exists.
Files.createDirectories() Javadoc states that an exception is not thrown
if the directory could not be created because it already exists.
---
src/main/java/org/apache/commons/io/file/PathUtils.java | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/io/file/PathUtils.java
b/src/main/java/org/apache/commons/io/file/PathUtils.java
index 978ba5a..ac8eac3 100644
--- a/src/main/java/org/apache/commons/io/file/PathUtils.java
+++ b/src/main/java/org/apache/commons/io/file/PathUtils.java
@@ -308,9 +308,6 @@ public final class PathUtils {
if (parent == null) {
return null;
}
- if (Files.isDirectory(parent)) {
- return parent;
- }
return Files.createDirectories(parent, attrs);
}