Author: mbrohl
Date: Sat Oct  7 14:15:58 2017
New Revision: 1811429

URL: http://svn.apache.org/viewvc?rev=1811429&view=rev
Log:
Improved: Fixing defects reported by FindBugs, package 
org.apache.ofbiz.security.
(OFBIZ-9635)

Thanks Dennis Balkir for reporting and providing the patch.

Modified:
    
ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java

Modified: 
ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java?rev=1811429&r1=1811428&r2=1811429&view=diff
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java
 Sat Oct  7 14:15:58 2017
@@ -87,7 +87,7 @@ public final class SecurityFactory {
 
         private Delegator delegator = null;
 
-        protected static final Map<String, Map<String, String>> 
simpleRoleEntity = UtilMisc.toMap(
+        private static final Map<String, Map<String, String>> simpleRoleEntity 
= UtilMisc.toMap(
             "ORDERMGR", UtilMisc.<String, String>toMap("name", "OrderRole", 
"pkey", "orderId"),
             "FACILITY", UtilMisc.<String, String>toMap("name", 
"FacilityParty", "pkey", "facilityId"),
             "MARKETING", UtilMisc.<String, String>toMap("name", 
"MarketingCampaignRole", "pkey", "marketingCampaignId"));
@@ -225,7 +225,7 @@ public final class SecurityFactory {
                 entityName = simpleRoleMap.get("name");
                 String pkey = simpleRoleMap.get("pkey");
                 if (pkey != null) {
-                    List<EntityExpr> expressions = new ArrayList<EntityExpr>();
+                    List<EntityExpr> expressions = new ArrayList<>();
                     for (String role: roles) {
                         
expressions.add(EntityCondition.makeCondition("roleTypeId", 
EntityOperator.EQUALS, role));
                     }


Reply via email to