fixed git merge problem

Former-commit-id: c9b325d28586a399bd666dbe235e73913f26b81e
This commit is contained in:
Jeremy Long
2013-09-02 16:19:47 -04:00
parent c309fa8b20
commit 6f94faee14
2 changed files with 5 additions and 9 deletions

View File

@@ -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);
} }

View File

@@ -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);
} }