renamed CallableDownloadTask to DownloadTask

Former-commit-id: 4ed8987945722d99e0f23b2f379321a652f76348
This commit is contained in:
Jeremy Long
2014-05-20 21:08:15 -04:00
parent 5dc9e51dd4
commit d43fee5585
3 changed files with 7 additions and 7 deletions

View File

@@ -34,7 +34,7 @@ import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties;
import static org.owasp.dependencycheck.data.nvdcve.DatabaseProperties.MODIFIED; import static org.owasp.dependencycheck.data.nvdcve.DatabaseProperties.MODIFIED;
import org.owasp.dependencycheck.data.update.exception.InvalidDataException; import org.owasp.dependencycheck.data.update.exception.InvalidDataException;
import org.owasp.dependencycheck.data.update.exception.UpdateException; import org.owasp.dependencycheck.data.update.exception.UpdateException;
import org.owasp.dependencycheck.data.update.task.CallableDownloadTask; import org.owasp.dependencycheck.data.update.task.DownloadTask;
import org.owasp.dependencycheck.data.update.task.ProcessTask; import org.owasp.dependencycheck.data.update.task.ProcessTask;
import org.owasp.dependencycheck.utils.DownloadFailedException; import org.owasp.dependencycheck.utils.DownloadFailedException;
import org.owasp.dependencycheck.utils.InvalidSettingException; import org.owasp.dependencycheck.utils.InvalidSettingException;
@@ -122,7 +122,7 @@ public class StandardUpdate {
final Set<Future<Future<ProcessTask>>> downloadFutures = new HashSet<Future<Future<ProcessTask>>>(maxUpdates); final Set<Future<Future<ProcessTask>>> downloadFutures = new HashSet<Future<Future<ProcessTask>>>(maxUpdates);
for (NvdCveInfo cve : updateable) { for (NvdCveInfo cve : updateable) {
if (cve.getNeedsUpdate()) { if (cve.getNeedsUpdate()) {
final CallableDownloadTask call = new CallableDownloadTask(cve, processExecutor, cveDB, Settings.getInstance()); final DownloadTask call = new DownloadTask(cve, processExecutor, cveDB, Settings.getInstance());
downloadFutures.add(downloadExecutors.submit(call)); downloadFutures.add(downloadExecutors.submit(call));
} }
} }

View File

@@ -37,12 +37,12 @@ import org.owasp.dependencycheck.utils.Settings;
* *
* @author Jeremy Long <jeremy.long@owasp.org> * @author Jeremy Long <jeremy.long@owasp.org>
*/ */
public class CallableDownloadTask implements Callable<Future<ProcessTask>> { public class DownloadTask implements Callable<Future<ProcessTask>> {
/** /**
* The Logger. * The Logger.
*/ */
private static final Logger LOGGER = Logger.getLogger(CallableDownloadTask.class.getName()); private static final Logger LOGGER = Logger.getLogger(DownloadTask.class.getName());
/** /**
* Simple constructor for the callable download task. * Simple constructor for the callable download task.
@@ -54,7 +54,7 @@ public class CallableDownloadTask implements Callable<Future<ProcessTask>> {
* the dependencies have a correct reference to the global settings. * the dependencies have a correct reference to the global settings.
* @throws UpdateException thrown if temporary files could not be created * @throws UpdateException thrown if temporary files could not be created
*/ */
public CallableDownloadTask(NvdCveInfo nvdCveInfo, ExecutorService processor, CveDB cveDB, Settings settings) throws UpdateException { public DownloadTask(NvdCveInfo nvdCveInfo, ExecutorService processor, CveDB cveDB, Settings settings) throws UpdateException {
this.nvdCveInfo = nvdCveInfo; this.nvdCveInfo = nvdCveInfo;
this.processorService = processor; this.processorService = processor;
this.cveDB = cveDB; this.cveDB = cveDB;

View File

@@ -79,7 +79,7 @@ public class ProcessTask implements Callable<ProcessTask> {
/** /**
* A reference to the callable download task. * A reference to the callable download task.
*/ */
private final CallableDownloadTask filePair; private final DownloadTask filePair;
/** /**
* A reference to the properties. * A reference to the properties.
*/ */
@@ -97,7 +97,7 @@ public class ProcessTask implements Callable<ProcessTask> {
* @param settings a reference to the global settings object; this is necessary so that when the thread is started * @param settings a reference to the global settings object; this is necessary so that when the thread is started
* the dependencies have a correct reference to the global settings. * the dependencies have a correct reference to the global settings.
*/ */
public ProcessTask(final CveDB cveDB, final CallableDownloadTask filePair, Settings settings) { public ProcessTask(final CveDB cveDB, final DownloadTask filePair, Settings settings) {
this.cveDB = cveDB; this.cveDB = cveDB;
this.filePair = filePair; this.filePair = filePair;
this.properties = cveDB.getDatabaseProperties(); this.properties = cveDB.getDatabaseProperties();