removed the ability to delete and recreate the schema

Former-commit-id: 0bcec9bb3d09038b03b5307c92104880c1393189
This commit is contained in:
Jeremy Long
2014-01-11 12:39:01 -05:00
parent 155f62fd22
commit 3d5b934f54

View File

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