Author: arunpatidar
Date: Tue Jun 28 13:52:23 2016
New Revision: 1750510
URL:
http://svn.apache.org/viewvc?rev=1750510&view=revLog:
Applied patch from jira issue - OFBIZ-7417 - Enforce noninstantiability to TaskWorker Class. Thanks Rishi Solanki and Anurag Chandak for your contribution.
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskWorker.java
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskWorker.java?rev=1750510&r1=1750509&r2=1750510&view=diff==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskWorker.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskWorker.java Tue Jun 28 13:52:23 2016
@@ -28,9 +28,12 @@ import org.ofbiz.entity.GenericValue;
/**
* Order Processing Task Worker
*/
-public class TaskWorker {
+public final class TaskWorker {
public static final String module = TaskWorker.class.getName();
+ private static final Map<String, String> statusMapping = UtilMisc.toMap("WF_NOT_STARTED", "Waiting", "WF_RUNNING", "Active", "WF_COMPLETE", "Complete", "WF_SUSPENDED", "Hold");
+
+ private TaskWorker() {}
public static String getCustomerName(GenericValue orderTaskList) {
String lastName = orderTaskList.getString("customerLastName");
@@ -46,7 +49,6 @@ public class TaskWorker {
}
}
- static Map<String, String> statusMapping = UtilMisc.toMap("WF_NOT_STARTED", "Waiting", "WF_RUNNING", "Active", "WF_COMPLETE", "Complete", "WF_SUSPENDED", "Hold");
public static String getPrettyStatus(GenericValue orderTaskList) {
String statusId = orderTaskList.getString("currentStatusId");