changed CveDB to a singeton

This commit is contained in:
Jeremy Long
2017-03-07 05:49:12 -05:00
parent 5ed5764ab5
commit 679df936e7
26 changed files with 343 additions and 719 deletions

View File

@@ -284,15 +284,8 @@ public class App {
final List<Dependency> dependencies = engine.getDependencies();
DatabaseProperties prop = null;
CveDB cve = null;
try {
cve = new CveDB();
cve.open();
prop = cve.getDatabaseProperties();
} finally {
if (cve != null) {
cve.close();
}
}
cve = CveDB.getInstance();
prop = cve.getDatabaseProperties();
final ReportGenerator report = new ReportGenerator(applicationName, dependencies, engine.getAnalyzers(), prop);
try {
report.generateReports(reportDirectory, outputFormat);