svn commit: r615850 - /ofbiz/branches/release4.0/framework/security/src/org/ofbiz/security/OFBizSecurity.java

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

svn commit: r615850 - /ofbiz/branches/release4.0/framework/security/src/org/ofbiz/security/OFBizSecurity.java

jleroux@apache.org
Author: jleroux
Date: Mon Jan 28 03:07:01 2008
New Revision: 615850

URL: http://svn.apache.org/viewvc?rev=615850&view=rev
Log:
Merged manually fix from trunk for revision: 615722

Modified:
    ofbiz/branches/release4.0/framework/security/src/org/ofbiz/security/OFBizSecurity.java

Modified: ofbiz/branches/release4.0/framework/security/src/org/ofbiz/security/OFBizSecurity.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/security/src/org/ofbiz/security/OFBizSecurity.java?rev=615850&r1=615849&r2=615850&view=diff
==============================================================================
--- ofbiz/branches/release4.0/framework/security/src/org/ofbiz/security/OFBizSecurity.java (original)
+++ ofbiz/branches/release4.0/framework/security/src/org/ofbiz/security/OFBizSecurity.java Mon Jan 28 03:07:01 2008
@@ -26,6 +26,8 @@
 
 import javax.servlet.http.HttpSession;
 
+import javolution.util.FastList;
+
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.entity.GenericDelegator;
@@ -76,12 +78,12 @@
         if (collection == null) {
             try {
                 collection = delegator.findByAnd("UserLoginSecurityGroup", UtilMisc.toMap("userLoginId", userLoginId), null);
+                // make an empty collection to speed up the case where a userLogin belongs to no security groups, only with no exception of course
+                if (collection == null) collection = FastList.newInstance();
+                userLoginSecurityGroupByUserLoginId.put(userLoginId, collection);
             } catch (GenericEntityException e) {
                 Debug.logWarning(e, module);
             }
-            // make an empty collection to speed up the case where a userLogin belongs to no security groups
-            if (collection == null) collection = new LinkedList();
-            userLoginSecurityGroupByUserLoginId.put(userLoginId, collection);
         }
         // filter each time after cache retreival, ie cache will contain entire list
         collection = EntityUtil.filterByDate(collection, true);