mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 00:03:43 +01:00
removed the ability to delete and recreate the schema
Former-commit-id: 0bcec9bb3d09038b03b5307c92104880c1393189
This commit is contained in:
@@ -22,7 +22,6 @@ import org.owasp.dependencycheck.data.update.exception.UpdateException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
|
||||
import org.owasp.dependencycheck.utils.DownloadFailedException;
|
||||
|
||||
/**
|
||||
@@ -44,15 +43,6 @@ public class NvdCveUpdater implements CachedWebDataSource {
|
||||
try {
|
||||
final StandardUpdate task = new StandardUpdate();
|
||||
if (task.isUpdateNeeded()) {
|
||||
if (task.shouldDeleteAndRecreate()) {
|
||||
try {
|
||||
task.recreateTables();
|
||||
} catch (DatabaseException ex) {
|
||||
final String msg = "Unable to update the database schema";
|
||||
Logger.getLogger(NvdCveUpdater.class.getName()).log(Level.SEVERE, msg);
|
||||
Logger.getLogger(NvdCveUpdater.class.getName()).log(Level.FINE, null, ex);
|
||||
}
|
||||
}
|
||||
task.update();
|
||||
}
|
||||
} catch (MalformedURLException ex) {
|
||||
@@ -65,16 +55,4 @@ public class NvdCveUpdater implements CachedWebDataSource {
|
||||
Logger.getLogger(NvdCveUpdater.class.getName()).log(Level.FINE, null, ex);
|
||||
}
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * Deletes the existing data directories.
|
||||
// *
|
||||
// * @throws IOException thrown if the directory cannot be deleted
|
||||
// */
|
||||
// protected void deleteExistingData() throws IOException {
|
||||
// File data = Settings.getDataFile(Settings.KEYS.CVE_DATA_DIRECTORY);
|
||||
// if (data.exists()) {
|
||||
// FileUtils.delete(data);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user