You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/06/17 13:57:56 UTC
[commons-io] branch master updated: [IO-804] FileUtils.forceMkdirParent api doc is likely incorrect
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 c9c9cc02 [IO-804] FileUtils.forceMkdirParent api doc is likely incorrect
c9c9cc02 is described below
commit c9c9cc02dc4432c788394dfbe85d1f9eae635c42
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jun 17 09:57:48 2023 -0400
[IO-804] FileUtils.forceMkdirParent api doc is likely incorrect
---
src/changes/changes.xml | 3 +++
src/main/java/org/apache/commons/io/FileUtils.java | 7 +++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 71523ced..eed27eea 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -65,6 +65,9 @@ The <action> type attribute can be add,update,fix,remove.
<action dev="ggregory" type="fix" issue="IO-799" due-to="Jeroen van der Vegt, Gary Gregory">
ReaderInputStream.read() throws an exception instead of returning -1 when called again after returning -1.
</action>
+ <action dev="ggregory" type="fix" issue="IO-804" due-to="Elliotte Rusty Harold, Gary Gregory">
+ FileUtils.forceMkdirParent() Javadoc is likely incorrect.
+ </action>
<!-- UPDATE -->
</release>
<release version="2.13.0" date="2023-06-03" description="Java 8 required.">
diff --git a/src/main/java/org/apache/commons/io/FileUtils.java b/src/main/java/org/apache/commons/io/FileUtils.java
index ef1f5082..736aafd6 100644
--- a/src/main/java/org/apache/commons/io/FileUtils.java
+++ b/src/main/java/org/apache/commons/io/FileUtils.java
@@ -1381,16 +1381,15 @@ public class FileUtils {
}
/**
- * Calls {@link File#mkdirs()} and throws an {@link IOException} on failure.
+ * Creates all directories for a File object, including any necessary but nonexistent parent directories. If the parent directory already exists or is null,
+ * nothing happens.
* <p>
- * Creates all directories for a File object, including any necessary but nonexistent parent directories. If the {@code directory} already exists or is
- * null, nothing happens.
+ * Calls {@link File#mkdirs()} for the parent of @{code file}.
* </p>
*
* @param file file with parents to create, must not be {@code null}.
* @throws NullPointerException if the file is {@code null}.
* @throws IOException if the directory was not created along with all its parent directories.
- * @throws IOException if the given file object is not a directory.
* @throws SecurityException See {@link File#mkdirs()}.
* @see File#mkdirs()
* @since 2.5