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);
} finally {
shutdownExecutorServices();
cveDb.close();
if(cveDb != null) {
cveDb.close();
}
if (lock != null) {
try {
lock.release();