From 5a2401b3689de9a64f34fbfc85ffb45f1c31c70a Mon Sep 17 00:00:00 2001 From: ashitsalesforce Date: Fri, 19 Jan 2024 16:27:32 -0800 Subject: [PATCH] code cleanup in progress monitor - remove unused methods and fields - fix message typos --- .../action/progress/NihilistProgressAdapter.java | 10 ---------- .../dataloader/action/progress/SWTProgressAdapter.java | 10 ---------- src/main/resources/messages.properties | 6 +++--- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/salesforce/dataloader/action/progress/NihilistProgressAdapter.java b/src/main/java/com/salesforce/dataloader/action/progress/NihilistProgressAdapter.java index 72e2ceab..6dd40b7e 100644 --- a/src/main/java/com/salesforce/dataloader/action/progress/NihilistProgressAdapter.java +++ b/src/main/java/com/salesforce/dataloader/action/progress/NihilistProgressAdapter.java @@ -49,7 +49,6 @@ public class NihilistProgressAdapter implements ILoaderProgress { private int numRowsWithError = 0; private int numberBatchesTotal = 0; private final Logger logger = LogManager.getLogger(getClass()); - private String taskName; private int workDone; private int totalWork; private final List subTasksInOrder = new ArrayList(); @@ -60,7 +59,6 @@ public NihilistProgressAdapter() { } public void beginTask(String name, int totalWork) { - this.taskName = name; this.totalWork = totalWork; } @@ -80,18 +78,10 @@ public void worked(int worked) { this.workDone += worked; } - public void setTaskName(String name) { - this.taskName = name; - } - public void setSubTask(String name) { this.subTasksInOrder.add(name); logger.info(name); } - - public String getTaskName() { - return this.taskName; - } public int getTotalWork() { return this.totalWork; diff --git a/src/main/java/com/salesforce/dataloader/action/progress/SWTProgressAdapter.java b/src/main/java/com/salesforce/dataloader/action/progress/SWTProgressAdapter.java index c736c8cd..7a2ab824 100644 --- a/src/main/java/com/salesforce/dataloader/action/progress/SWTProgressAdapter.java +++ b/src/main/java/com/salesforce/dataloader/action/progress/SWTProgressAdapter.java @@ -110,16 +110,6 @@ public void worked(int worked) { monitor.worked(worked); } - /* - * (non-Javadoc) - * - * @see com.sfdc.action.progress.ILoaderProgress#setTaskName(java.lang.String) - */ - public void setTaskName(String name) { - super.setTaskName(name); - monitor.setTaskName(name); - } - /* * (non-Javadoc) * diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index a4313b72..7a03bec6 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -23,15 +23,15 @@ Process.aboutPerform=About to perform: {0} Process.missingRequiredArg=Missing required argument: {0} Action.loading=Loading: {0} Action.logCanceled=Load was canceled. -Action.exception=Exception occured during loading +Action.exception=Exception occurred during loading Action.logSuccess=Load completed successfully. Action.success=The operation has fully completed. There were {0} successful {1}s and {2} errors. AbstractExtractAction.success=The operation has fully completed. There were {0} successful extractions and {2} errors. Action.cancel=The operation was cancelled. There were {0} successful {1}s and {2} errors. Action.error=Load finished with an error. Please check the log. -Action.errorDaoStartRow=Can't read from dao when calulating start row +Action.errorDaoStartRow=Can't read from DAO when calculating start row Action.errorLastRun=Can't save last run info -RowToStartUtil.errorDaoStartRow=Can't read from dao when calculating start row +RowToStartUtil.errorDaoStartRow=Can't read from DAO when calculating start row RowToStartUtil.errorLastRun=Can't save last run info Action.errorOpeningErrorFile=Error opening error status file: {0} Action.errorOpeningSuccessFile=Error opening success status file: {0}