mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-19 15:54:52 +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);
|
list.add(word);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tempWord != null) {
|
if (tempWord != null && !list.isEmpty()) {
|
||||||
String tmp = list.get(list.size() - 1) + tempWord;
|
String tmp = list.get(list.size() - 1) + tempWord;
|
||||||
list.add(tmp);
|
list.add(tmp);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.owasp.dependencycheck.utils;
|
package org.owasp.dependencycheck.utils;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import org.owasp.dependencycheck.utils.Settings;
|
import org.owasp.dependencycheck.utils.Settings;
|
||||||
import org.owasp.dependencycheck.utils.Downloader;
|
import org.owasp.dependencycheck.utils.Downloader;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
@@ -59,17 +60,12 @@ public class DownloaderIntegrationTest {
|
|||||||
public void testFetchFile() throws Exception {
|
public void testFetchFile() throws Exception {
|
||||||
|
|
||||||
// Settings.setString(Settings.KEYS.CONNECTION_TIMEOUT, "1000");
|
// Settings.setString(Settings.KEYS.CONNECTION_TIMEOUT, "1000");
|
||||||
|
|
||||||
// Settings.setString(Settings.KEYS.PROXY_PORT, "8080");
|
// Settings.setString(Settings.KEYS.PROXY_PORT, "8080");
|
||||||
// Settings.setString(Settings.KEYS.PROXY_URL, "127.0.0.1");
|
// Settings.setString(Settings.KEYS.PROXY_URL, "127.0.0.1");
|
||||||
|
|
||||||
URL url = new URL(Settings.getString(Settings.KEYS.CPE_URL));
|
URL url = new URL(Settings.getString(Settings.KEYS.CVE_MODIFIED_20_URL));
|
||||||
String outputPath = "target/downloaded_cpe.xml";
|
File outputPath = new File("target/downloaded_cve.xml");
|
||||||
Downloader.fetchFile(url, outputPath, true);
|
Downloader.fetchFile(url, outputPath);
|
||||||
|
|
||||||
url = new URL(Settings.getString(Settings.KEYS.CVE_MODIFIED_20_URL));
|
|
||||||
outputPath = "target/downloaded_cve.xml";
|
|
||||||
Downloader.fetchFile(url, outputPath, false);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user