mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-13 15:23:40 +01:00
cleanup: remove unused stuff
This commit is contained in:
@@ -25,8 +25,6 @@ import java.util.Map.Entry;
|
||||
import java.util.TreeMap;
|
||||
import org.owasp.dependencycheck.utils.DownloadFailedException;
|
||||
import org.owasp.dependencycheck.utils.Downloader;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Contains a collection of updateable NvdCveInfo objects. This is used to determine which files need to be downloaded and
|
||||
@@ -36,10 +34,6 @@ import org.slf4j.LoggerFactory;
|
||||
*/
|
||||
public class UpdateableNvdCve implements Iterable<NvdCveInfo>, Iterator<NvdCveInfo> {
|
||||
|
||||
/**
|
||||
* A reference to the logger.
|
||||
*/
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(UpdateableNvdCve.class);
|
||||
/**
|
||||
* A collection of sources of data.
|
||||
*/
|
||||
@@ -68,19 +62,6 @@ public class UpdateableNvdCve implements Iterable<NvdCveInfo>, Iterator<NvdCveIn
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new entry of updateable information to the contained collection.
|
||||
*
|
||||
* @param id the key for the item to be added
|
||||
* @param url the URL to download the item
|
||||
* @param oldUrl the URL for the old version of the item (the NVD CVE old schema still contains useful data we need).
|
||||
* @throws MalformedURLException thrown if the URL provided is invalid
|
||||
* @throws DownloadFailedException thrown if the download fails.
|
||||
*/
|
||||
public void add(String id, String url, String oldUrl) throws MalformedURLException, DownloadFailedException {
|
||||
add(id, url, oldUrl, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new entry of updateable information to the contained collection.
|
||||
*
|
||||
|
||||
@@ -61,23 +61,7 @@ public class UpdateableNvdCveTest extends BaseTest {
|
||||
* Test of add method, of class UpdateableNvdCve.
|
||||
*/
|
||||
@Test
|
||||
public void testAdd_3args() throws Exception {
|
||||
String id = "key";
|
||||
//use a local file as this test will load the result and check the timestamp
|
||||
String url = "file:///" + new File("target/test-classes/nvdcve-2.0-2012.xml").toURI().toString();
|
||||
UpdateableNvdCve instance = new UpdateableNvdCve();
|
||||
instance.add(id, url, url);
|
||||
NvdCveInfo results = instance.get(id);
|
||||
assertEquals(id, results.getId());
|
||||
assertEquals(url, results.getUrl());
|
||||
assertEquals(url, results.getOldSchemaVersionUrl());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of add method, of class UpdateableNvdCve.
|
||||
*/
|
||||
@Test
|
||||
public void testAdd_4args() throws Exception {
|
||||
public void testAdd() throws Exception {
|
||||
String id = "key";
|
||||
//use a local file as this test will load the result and check the timestamp
|
||||
String url = new File("target/test-classes/nvdcve-2.0-2012.xml").toURI().toString();
|
||||
|
||||
Reference in New Issue
Block a user