IO-724 FileUtils#deleteDirectory(File) exception Javadoc inaccurate update by liran2000 · Pull Request #245 · apache/commons-io
FileUtils.deleteDirectory javadoc is inaccurate for nonexistent directory.
Change for returned exception javadoc, as the conditions at the method implementation do not match the javadoc.
Method implementation does not throws the IllegalArgumentException from the javadoc if directory does not exist:
if (!directory.exists()) {
return;
}
This one line code proves it:
FileUtils.deleteDirectory(new File("nonexistingdir"));