svn commit: r1751333 - /ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java

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

svn commit: r1751333 - /ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java

Arun Patidar-4
Author: arunpatidar
Date: Mon Jul  4 16:26:14 2016
New Revision: 1751333

URL: http://svn.apache.org/viewvc?rev=1751333&view=rev
Log:
Applied patch from jira issue - OFBIZ-7686 - Enforce noninstantiability to EntityEcaUtil class. Thanks Pratik Kulshreshth and Rishi Solanki for your contribution.

Modified:
    ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java

Modified: ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java?rev=1751333&r1=1751332&r2=1751333&view=diff
==============================================================================
--- ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java (original)
+++ ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java Mon Jul  4 16:26:14 2016
@@ -45,12 +45,14 @@ import org.w3c.dom.Element;
 /**
  * EntityEcaUtil
  */
-public class EntityEcaUtil {
+public final class EntityEcaUtil {
 
     public static final String module = EntityEcaUtil.class.getName();
 
     private static final UtilCache<String, Map<String, Map<String, List<EntityEcaRule>>>> entityEcaReaders = UtilCache.createUtilCache("entity.EcaReaders", 0, 0, false);
 
+    private EntityEcaUtil () {}
+
     public static Map<String, Map<String, List<EntityEcaRule>>> getEntityEcaCache(String entityEcaReaderName) {
         Map<String, Map<String, List<EntityEcaRule>>> ecaCache = entityEcaReaders.get(entityEcaReaderName);
         if (ecaCache == null) {
@@ -76,7 +78,7 @@ public class EntityEcaUtil {
         return delegatorInfo.getEntityEcaReader();
     }
 
-    protected static void readConfig(String entityEcaReaderName, Map<String, Map<String, List<EntityEcaRule>>> ecaCache) {
+    private static void readConfig(String entityEcaReaderName, Map<String, Map<String, List<EntityEcaRule>>> ecaCache) {
         EntityEcaReader entityEcaReaderInfo = null;
         try {
             entityEcaReaderInfo = EntityConfig.getInstance().getEntityEcaReader(entityEcaReaderName);
@@ -144,7 +146,7 @@ public class EntityEcaUtil {
         return rules;
     }
 
-    protected static Callable<List<EntityEcaRule>> createEcaLoaderCallable(final ResourceHandler handler) {
+    private static Callable<List<EntityEcaRule>> createEcaLoaderCallable(final ResourceHandler handler) {
         return new Callable<List<EntityEcaRule>>() {
             public List<EntityEcaRule> call() throws Exception {
                 return getEcaDefinitions(handler);