You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ar...@apache.org on 2016/06/28 13:52:23 UTC

svn commit: r1750510 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskWorker.java

Author: arunpatidar
Date: Tue Jun 28 13:52:23 2016
New Revision: 1750510

URL: http://svn.apache.org/viewvc?rev=1750510&view=rev
Log:
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");