svn commit: r1751321 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1751321 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java

Arun Patidar-4
Author: arunpatidar
Date: Mon Jul  4 15:36:44 2016
New Revision: 1751321

URL: http://svn.apache.org/viewvc?rev=1751321&view=rev
Log:
Applied patch from jira issue - OFBIZ-7630 - Enforce noninstantiability to UtilNumber class. Thanks Rishi Solanki and Anurag Chandak for your contribution.

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java?rev=1751321&r1=1751320&r2=1751321&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java Mon Jul  4 15:36:44 2016
@@ -46,12 +46,14 @@ import org.w3c.dom.Element;
 /**
  * ServiceEcaUtil
  */
-public class ServiceEcaUtil {
+public final class ServiceEcaUtil {
 
     public static final String module = ServiceEcaUtil.class.getName();
 
     // using a cache is dangerous here because if someone clears it the ECAs won't run: public static UtilCache ecaCache = new UtilCache("service.ServiceECAs", 0, 0, false);
-    public static Map<String, Map<String, List<ServiceEcaRule>>> ecaCache = new ConcurrentHashMap<String, Map<String, List<ServiceEcaRule>>>();
+    private static Map<String, Map<String, List<ServiceEcaRule>>> ecaCache = new ConcurrentHashMap<String, Map<String, List<ServiceEcaRule>>>();
+
+    private ServiceEcaUtil() {}
 
     public static void reloadConfig() {
         ecaCache.clear();
@@ -88,7 +90,7 @@ public class ServiceEcaUtil {
         }
     }
 
-    protected static Callable<List<ServiceEcaRule>> createEcaLoaderCallable(final ResourceHandler handler) {
+    private static Callable<List<ServiceEcaRule>> createEcaLoaderCallable(final ResourceHandler handler) {
         return new Callable<List<ServiceEcaRule>>() {
             public List<ServiceEcaRule> call() throws Exception {
                 return getEcaDefinitions(handler);