mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 00:03:43 +01:00
update to close to set objects to null
Former-commit-id: 9c1caaeca9ca0a472180eb6bf4bb7a7c7fba6e6e
This commit is contained in:
@@ -58,6 +58,8 @@ public abstract class BaseUpdater {
|
||||
if (cveDB != null) {
|
||||
try {
|
||||
cveDB.close();
|
||||
cveDB = null;
|
||||
properties = null;
|
||||
} catch (Throwable ignore) {
|
||||
LOGGER.trace("Error closing the database", ignore);
|
||||
}
|
||||
@@ -76,11 +78,11 @@ public abstract class BaseUpdater {
|
||||
try {
|
||||
cveDB = new CveDB();
|
||||
cveDB.open();
|
||||
properties = cveDB.getDatabaseProperties();
|
||||
} catch (DatabaseException ex) {
|
||||
closeDataStores();
|
||||
LOGGER.debug("Database Exception opening databases", ex);
|
||||
throw new UpdateException("Error updating the database, please see the log file for more details.");
|
||||
}
|
||||
properties = cveDB.getDatabaseProperties();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user