mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-22 09:09:31 +01:00
initial fix for CveDB singleton
This commit is contained in:
@@ -94,7 +94,7 @@ public class EngineVersionCheck implements CachedWebDataSource {
|
|||||||
@Override
|
@Override
|
||||||
public void update() throws UpdateException {
|
public void update() throws UpdateException {
|
||||||
try {
|
try {
|
||||||
CveDB db = CveDB.getInstance();
|
final CveDB db = CveDB.getInstance();
|
||||||
final boolean autoupdate = Settings.getBoolean(Settings.KEYS.AUTO_UPDATE, true);
|
final boolean autoupdate = Settings.getBoolean(Settings.KEYS.AUTO_UPDATE, true);
|
||||||
final boolean enabled = Settings.getBoolean(Settings.KEYS.UPDATE_VERSION_CHECK_ENABLED, true);
|
final boolean enabled = Settings.getBoolean(Settings.KEYS.UPDATE_VERSION_CHECK_ENABLED, true);
|
||||||
final String original = Settings.getString(Settings.KEYS.CVE_ORIGINAL_MODIFIED_20_URL);
|
final String original = Settings.getString(Settings.KEYS.CVE_ORIGINAL_MODIFIED_20_URL);
|
||||||
@@ -106,9 +106,9 @@ public class EngineVersionCheck implements CachedWebDataSource {
|
|||||||
*/
|
*/
|
||||||
if (enabled && autoupdate && original != null && original.equals(current)) {
|
if (enabled && autoupdate && original != null && original.equals(current)) {
|
||||||
LOGGER.debug("Begin Engine Version Check");
|
LOGGER.debug("Begin Engine Version Check");
|
||||||
|
|
||||||
final DatabaseProperties properties = db.getDatabaseProperties();
|
final DatabaseProperties properties = db.getDatabaseProperties();
|
||||||
|
|
||||||
final long lastChecked = Long.parseLong(properties.getProperty(ENGINE_VERSION_CHECKED_ON, "0"));
|
final long lastChecked = Long.parseLong(properties.getProperty(ENGINE_VERSION_CHECKED_ON, "0"));
|
||||||
final long now = System.currentTimeMillis();
|
final long now = System.currentTimeMillis();
|
||||||
updateToVersion = properties.getProperty(CURRENT_ENGINE_RELEASE, "");
|
updateToVersion = properties.getProperty(CURRENT_ENGINE_RELEASE, "");
|
||||||
|
|||||||
Reference in New Issue
Block a user