Why the heading error in the findbugs for the following code.
boolean isCreated = folder.mkdirs();
if (!isCreated) {
throw new IOException("Folder already exists..!!!");
}
Why the heading error in the findbugs for the following code.
boolean isCreated = folder.mkdirs();
if (!isCreated) {
throw new IOException("Folder already exists..!!!");
}
According to Finds Bug Description.
Method ignores exceptional return value
Method returns a value that is not checked. The return value should be checked since it can indicate an unusual or unexpected function execution.
Probably because you're not checking for the SecurityException that mkdirs can throw.