update to close to set objects to null

Former-commit-id: 9c1caaeca9ca0a472180eb6bf4bb7a7c7fba6e6e
This commit is contained in:
Jeremy Long
2015-07-19 05:49:06 -04:00
parent b2edf5683c
commit ba6a783834

View File

@@ -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();
}
}