mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-18 23:34:15 +01:00
updated to support the new Settings implementation
Former-commit-id: 471a24d23377d74b88e0693d4e9632bfb28a8511
This commit is contained in:
@@ -747,16 +747,9 @@ public class DependencyCheckScanAgent {
|
|||||||
private Engine executeDependencyCheck() throws DatabaseException {
|
private Engine executeDependencyCheck() throws DatabaseException {
|
||||||
populateSettings();
|
populateSettings();
|
||||||
Engine engine = null;
|
Engine engine = null;
|
||||||
try {
|
engine = new Engine();
|
||||||
engine = new Engine();
|
engine.setDependencies(this.dependencies);
|
||||||
engine.setDependencies(this.dependencies);
|
engine.analyzeDependencies();
|
||||||
engine.analyzeDependencies();
|
|
||||||
|
|
||||||
} finally {
|
|
||||||
if (engine != null) {
|
|
||||||
engine.cleanup();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return engine;
|
return engine;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -799,6 +792,7 @@ public class DependencyCheckScanAgent {
|
|||||||
* properties required to change the proxy url, port, and connection timeout.
|
* properties required to change the proxy url, port, and connection timeout.
|
||||||
*/
|
*/
|
||||||
private void populateSettings() {
|
private void populateSettings() {
|
||||||
|
Settings.initialize();
|
||||||
if (dataDirectory != null) {
|
if (dataDirectory != null) {
|
||||||
Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDirectory);
|
Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDirectory);
|
||||||
} else {
|
} else {
|
||||||
@@ -891,6 +885,7 @@ public class DependencyCheckScanAgent {
|
|||||||
"Unable to connect to the dependency-check database; analysis has stopped");
|
"Unable to connect to the dependency-check database; analysis has stopped");
|
||||||
Logger.getLogger(DependencyCheckScanAgent.class.getName()).log(Level.FINE, "", ex);
|
Logger.getLogger(DependencyCheckScanAgent.class.getName()).log(Level.FINE, "", ex);
|
||||||
} finally {
|
} finally {
|
||||||
|
Settings.cleanup();
|
||||||
if (engine != null) {
|
if (engine != null) {
|
||||||
engine.cleanup();
|
engine.cleanup();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user