mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-17 23:04:07 +01:00
collapsed nested if statements
Former-commit-id: 7e70e8a399042c413e86a772b6345fc6e52df235
This commit is contained in:
@@ -70,11 +70,9 @@ public class Index extends AbstractIndex {
|
|||||||
*/
|
*/
|
||||||
public File getDataDirectory() throws IOException {
|
public File getDataDirectory() throws IOException {
|
||||||
final String fileName = Settings.getString(Settings.KEYS.CPE_INDEX);
|
final String fileName = Settings.getString(Settings.KEYS.CPE_INDEX);
|
||||||
File path = FileUtils.getDataDirectory(fileName, Index.class);
|
final File path = FileUtils.getDataDirectory(fileName, Index.class);
|
||||||
if (!path.exists()) {
|
if (!path.exists() && !path.mkdirs()) {
|
||||||
if (!path.mkdirs()) {
|
throw new IOException("Unable to create CPE Data directory");
|
||||||
throw new IOException("Unable to create CPE Data directory");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user