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/07/04 14:23:23 UTC

svn commit: r1751292 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java

Author: arunpatidar
Date: Mon Jul  4 14:23:22 2016
New Revision: 1751292

URL: http://svn.apache.org/viewvc?rev=1751292&view=rev
Log:
Applied patch from jira issue - OFBIZ-7690 - Enforce noninstantiability to PreferenceWorker class. Thanks Rishi solanki and Rohit Koushal for your contribution.

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java?rev=1751292&r1=1751291&r2=1751292&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java Mon Jul  4 14:23:22 2016
@@ -34,23 +34,25 @@ import org.ofbiz.service.ServiceUtil;
 /**
  * User preference worker methods.
  */
-public class PreferenceWorker {
+public final class PreferenceWorker {
     public static final String module = PreferenceWorker.class.getName();
     /**
      * User preference administrator permission. Currently set to "USERPREF_ADMIN".
      */
-    public static final String ADMIN_PERMISSION = "USERPREF_ADMIN";
+    private static final String ADMIN_PERMISSION = "USERPREF_ADMIN";
     /** User login ID parameter name. Currently set to "userPrefLoginId". This
      * parameter name is used in preference service definitions to specify a user login ID
      * that is different than the currently logged in user.
      */
-    public static final String LOGINID_PARAMETER_NAME = "userPrefLoginId";
+    private static final String LOGINID_PARAMETER_NAME = "userPrefLoginId";
 
     /** Default userLoginId. Currently set to "_NA_". This userLoginId is used to
      * retrieve default preferences when the user is not logged in.
      */
-    public static final String DEFAULT_UID = "_NA_";
+    private static final String DEFAULT_UID = "_NA_";
 
+    private PreferenceWorker () {}
+    
     /**
      * Add a UserPreference GenericValue to a Map.
      * @param rec GenericValue to convert