diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/update/NvdCveUpdater.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/update/NvdCveUpdater.java index dd22e2fa8..a942f98a3 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/update/NvdCveUpdater.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/update/NvdCveUpdater.java @@ -225,7 +225,7 @@ public class NvdCveUpdater extends BaseUpdater implements CachedWebDataSource { //next, move the future future processTasks to just future processTasks final Set> processFutures = new HashSet>(maxUpdates); for (Future> future : downloadFutures) { - Future task = null; + Future task; try { task = future.get(); } catch (InterruptedException ex) { @@ -280,8 +280,9 @@ public class NvdCveUpdater extends BaseUpdater implements CachedWebDataSource { * @throws UpdateException Is thrown if there is an issue with the last * updated properties file */ - protected final UpdateableNvdCve getUpdatesNeeded() throws MalformedURLException, DownloadFailedException, UpdateException { - UpdateableNvdCve updates = null; + final UpdateableNvdCve getUpdatesNeeded() throws MalformedURLException, DownloadFailedException, UpdateException { + LOGGER.info("starting getUpdatesNeeded() ..."); + UpdateableNvdCve updates; try { updates = retrieveCurrentTimestampsFromWeb(); } catch (InvalidDataException ex) { diff --git a/dependency-check-core/src/test/java/org/owasp/dependencycheck/data/update/NvdCveUpdaterIntegrationTest.java b/dependency-check-core/src/test/java/org/owasp/dependencycheck/data/update/NvdCveUpdaterIntegrationTest.java index 526ae1580..94b115d90 100644 --- a/dependency-check-core/src/test/java/org/owasp/dependencycheck/data/update/NvdCveUpdaterIntegrationTest.java +++ b/dependency-check-core/src/test/java/org/owasp/dependencycheck/data/update/NvdCveUpdaterIntegrationTest.java @@ -17,13 +17,10 @@ */ package org.owasp.dependencycheck.data.update; -import java.net.MalformedURLException; import static org.junit.Assert.assertNotNull; import org.junit.Test; import org.owasp.dependencycheck.BaseTest; -import org.owasp.dependencycheck.data.update.exception.UpdateException; import org.owasp.dependencycheck.data.update.nvd.UpdateableNvdCve; -import org.owasp.dependencycheck.utils.DownloadFailedException; /** * @@ -31,23 +28,23 @@ import org.owasp.dependencycheck.utils.DownloadFailedException; */ public class NvdCveUpdaterIntegrationTest extends BaseTest { - public NvdCveUpdater getUpdater() throws MalformedURLException, DownloadFailedException, UpdateException { + public NvdCveUpdater getUpdater() { NvdCveUpdater instance = new NvdCveUpdater(); instance.initializeExecutorServices(); return instance; } -// test removed as it is duplicative of the EngineIntegrationTest and the NvdCveUpdaterIntergraionTest -// /** -// * Test of update method, of class StandardUpdate. -// */ + /** + * Test of update method. + */ @Test public void testUpdate() throws Exception { NvdCveUpdater instance = getUpdater(); instance.update(); } + /** - * Test of updatesNeeded method, of class StandardUpdate. + * Test of updatesNeeded method. */ @Test public void testUpdatesNeeded() throws Exception {