mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-05-03 05:34:52 +02:00
fixed merge
This commit is contained in:
@@ -941,9 +941,7 @@ public class Check extends Update {
|
||||
}
|
||||
}
|
||||
DatabaseProperties prop = null;
|
||||
CveDB cve;
|
||||
try {
|
||||
cve = CveDB.getInstance();
|
||||
try (CveDB cve = CveDB.getInstance()) {
|
||||
prop = cve.getDatabaseProperties();
|
||||
} catch (DatabaseException ex) {
|
||||
//TODO shouldn't this be a fatal exception
|
||||
|
||||
@@ -31,7 +31,6 @@ import org.owasp.dependencycheck.utils.Settings;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jeremy Long
|
||||
@@ -65,15 +64,11 @@ public class DependencyCheckTaskTest {
|
||||
@Test
|
||||
public void testAddFileSet() throws Exception {
|
||||
File report = new File("target/dependency-check-report.html");
|
||||
if (report.exists()) {
|
||||
if (!report.delete()) {
|
||||
throw new Exception("Unable to delete 'target/DependencyCheck-Report.html' prior to test.");
|
||||
}
|
||||
if (report.exists() && !report.delete()) {
|
||||
throw new Exception("Unable to delete 'target/DependencyCheck-Report.html' prior to test.");
|
||||
}
|
||||
buildFileRule.executeTarget("test.fileset");
|
||||
|
||||
assertTrue("DependencyCheck report was not generated", report.exists());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user