-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IO-724 FileUtils#deleteDirectory(File) exception Javadoc inaccurate update #245
Conversation
FileUtils.deleteDirectory javadoc is inaccurate for nonexistent directory
Thinng about this will be better when after we apply JSR305 If my memory be correct, there be a branch adding these annotations to suggest Nullable or NotNull. How's it going @garydgregory ? |
Remove NullPointerException from javadoc as future annotation may comes to place
The most important here is to remove the "IllegalArgumentException" if directory does not exist from the javadoc, which does not match the implementation condition: if (!directory.exists()) { return;} Regarding Nullable/NotNull, got it, removed this addition for now. |
Fixing Javadoc here is good. JSR305/8 is a different story, which we are not doing for now. |
@XenoAmess @garydgregory thank you, can you then please review and merge this PR ? |
I should be able to look at this later today, AFK ATM. |
@garydgregory thanks, will wait for your review and merge. |
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"));