Update Javadoc and test to reflect implementation.
MODIFY
src/main/java/org/apache/commons/io/FileUtils.java
src/main/java/org/apache/commons/io/FileUtils.java
@@ -1407,7 +1407,7 @@ public static void forceDeleteOnExit(final File file) throws IOException {
* If the directory cannot be created (or the file already exists but is not a directory)
* then an IOException is thrown.
*
- * @param directory directory to create, must not be {@code null}.
+ * @param directory directory to create, may be {@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()}.
@@ -2966,7 +2966,7 @@ public static long sizeOf(final File file) {
requireExists(file, "file");
try {
return PathUtils.sizeOf(file.toPath());
- } catch (IOException e) {
+ } catch (final IOException e) {
// TODO Update method signature
throw new UncheckedIOException(e);
}
@@ -2995,7 +2995,7 @@ public static BigInteger sizeOfAsBigInteger(final File file) {
requireExists(file, "file");
try {
return PathUtils.sizeOfAsBigInteger(file.toPath());
- } catch (IOException e) {
+ } catch (final IOException e) {
// TODO Update method signature
throw new UncheckedIOException(e);
}
@@ -3019,7 +3019,7 @@ public static long sizeOfDirectory(final File directory) {
requireDirectoryExists(directory, "directory");
try {
return PathUtils.sizeOfDirectory(directory.toPath());
- } catch (IOException e) {
+ } catch (final IOException e) {
// TODO Update method signature
throw new UncheckedIOException(e);
}
@@ -3038,7 +3038,7 @@ public static BigInteger sizeOfDirectoryAsBigInteger(final File directory) {
requireDirectoryExists(directory, "directory");
try {
return PathUtils.sizeOfDirectoryAsBigInteger(directory.toPath());
- } catch (IOException e) {
+ } catch (final IOException e) {
// TODO Update method signature
throw new UncheckedIOException(e);
}

MODIFY
src/test/java/org/apache/commons/io/FileUtilsTestCase.java
src/test/java/org/apache/commons/io/FileUtilsTestCase.java
@@ -1516,6 +1516,9 @@ public void testForceMkdir() throws Exception {
// Tests with non-existent directory
FileUtils.forceMkdir(testFile);
assertTrue(testFile.exists(), "Directory was not created.");
+
+ // noop
+ FileUtils.forceMkdir(null);
}
@Test

Update Javadoc and test to reflect implementation.