Prevent NPE in case the CveDB.getInstance() failed. This NPE masked the actual cause thereby hampering issue analysis

This commit is contained in:
Stefan Neuhaus
2017-07-13 21:21:03 +02:00
parent d7d5e0c757
commit 239c5f2e46

View File

@@ -172,7 +172,9 @@ public class NvdCveUpdater implements CachedWebDataSource {
throw new UpdateException("Database Exception", ex); throw new UpdateException("Database Exception", ex);
} finally { } finally {
shutdownExecutorServices(); shutdownExecutorServices();
cveDb.close(); if(cveDb != null) {
cveDb.close();
}
if (lock != null) { if (lock != null) {
try { try {
lock.release(); lock.release();