fixed build issue with CveDB being closed before saving the property

This commit is contained in:
Jeremy Long
2016-06-05 17:16:05 -04:00
parent f6b80630dd
commit ef4a260615

View File

@@ -76,10 +76,10 @@ public class NvdCveUpdater extends BaseUpdater implements CachedWebDataSource {
}
if (autoUpdate && checkUpdate()) {
final UpdateableNvdCve updateable = getUpdatesNeeded();
getProperties().save(DatabaseProperties.LAST_CHECKED, Long.toString(System.currentTimeMillis()));
if (updateable.isUpdateNeeded()) {
performUpdate(updateable);
}
getProperties().save(DatabaseProperties.LAST_CHECKED, Long.toString(System.currentTimeMillis()));
}
}
} catch (MalformedURLException ex) {
LOGGER.warn(