mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
fixed git merge problem
Former-commit-id: c9b325d28586a399bd666dbe235e73913f26b81e
This commit is contained in:
@@ -459,7 +459,7 @@ public class CPEAnalyzer implements Analyzer {
|
||||
list.add(word);
|
||||
}
|
||||
}
|
||||
if (tempWord != null) {
|
||||
if (tempWord != null && !list.isEmpty()) {
|
||||
String tmp = list.get(list.size() - 1) + tempWord;
|
||||
list.add(tmp);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.owasp.dependencycheck.utils;
|
||||
|
||||
import java.io.File;
|
||||
import org.owasp.dependencycheck.utils.Settings;
|
||||
import org.owasp.dependencycheck.utils.Downloader;
|
||||
import java.net.URL;
|
||||
@@ -59,17 +60,12 @@ public class DownloaderIntegrationTest {
|
||||
public void testFetchFile() throws Exception {
|
||||
|
||||
// Settings.setString(Settings.KEYS.CONNECTION_TIMEOUT, "1000");
|
||||
|
||||
// Settings.setString(Settings.KEYS.PROXY_PORT, "8080");
|
||||
// Settings.setString(Settings.KEYS.PROXY_URL, "127.0.0.1");
|
||||
|
||||
URL url = new URL(Settings.getString(Settings.KEYS.CPE_URL));
|
||||
String outputPath = "target/downloaded_cpe.xml";
|
||||
Downloader.fetchFile(url, outputPath, true);
|
||||
|
||||
url = new URL(Settings.getString(Settings.KEYS.CVE_MODIFIED_20_URL));
|
||||
outputPath = "target/downloaded_cve.xml";
|
||||
Downloader.fetchFile(url, outputPath, false);
|
||||
URL url = new URL(Settings.getString(Settings.KEYS.CVE_MODIFIED_20_URL));
|
||||
File outputPath = new File("target/downloaded_cve.xml");
|
||||
Downloader.fetchFile(url, outputPath);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user