mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-22 00:59:34 +01:00
Removed an unused import and combined nested if statements.
This commit is contained in:
@@ -31,7 +31,6 @@ import java.io.UnsupportedEncodingException;
|
|||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.logging.Level;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple settings container that wraps the dependencycheck.properties file.
|
* A simple settings container that wraps the dependencycheck.properties file.
|
||||||
@@ -626,11 +625,9 @@ public final class Settings {
|
|||||||
*/
|
*/
|
||||||
public static File getTempDirectory() throws IOException {
|
public static File getTempDirectory() throws IOException {
|
||||||
final File tmpDir = new File(Settings.getString(Settings.KEYS.TEMP_DIRECTORY, System.getProperty("java.io.tmpdir")), "dctemp");
|
final File tmpDir = new File(Settings.getString(Settings.KEYS.TEMP_DIRECTORY, System.getProperty("java.io.tmpdir")), "dctemp");
|
||||||
if (!tmpDir.exists()) {
|
if (!tmpDir.exists() && !tmpDir.mkdirs()) {
|
||||||
if (!tmpDir.mkdirs()) {
|
final String msg = String.format("Unable to make a temporary folder '%s'", tmpDir.getPath());
|
||||||
final String msg = String.format("Unable to make a temporary folder '%s'", tmpDir.getPath());
|
throw new IOException(msg);
|
||||||
throw new IOException(msg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
tempDirectory = tmpDir;
|
tempDirectory = tmpDir;
|
||||||
return tmpDir;
|
return tmpDir;
|
||||||
|
|||||||
Reference in New Issue
Block a user