fixed issues related to making the cveDb a singleton

This commit is contained in:
Jeremy Long
2017-03-31 06:58:37 -04:00
parent 539bd754df
commit e2a1a59543
20 changed files with 153 additions and 110 deletions

View File

@@ -941,14 +941,11 @@ public class Check extends Update {
}
}
DatabaseProperties prop = null;
try {
final CveDB cve = CveDB.getInstance();
try (CveDB cve = CveDB.getInstance()) {
prop = cve.getDatabaseProperties();
} catch (DatabaseException ex) {
//TODO shouldn't this be a fatal exception
log("Unable to retrieve DB Properties", ex, Project.MSG_DEBUG);
} finally {
CveDB.close();
}
final ReportGenerator reporter = new ReportGenerator(getProjectName(), engine.getDependencies(), engine.getAnalyzers(), prop);