SEC-1549: AclPermissionCacheOptimizer now does nothing if passed an empty collection of domain objects.

This commit is contained in:
Luke Taylor
2010-08-28 14:39:43 +01:00
parent 20988c8cf6
commit 65712f5cbc
2 changed files with 60 additions and 0 deletions

View File

@@ -33,6 +33,10 @@ public class AclPermissionCacheOptimizer implements PermissionCacheOptimizer {
}
public void cachePermissionsFor(Authentication authentication, Collection<?> objects) {
if (objects.isEmpty()) {
return;
}
List<ObjectIdentity> oidsToCache = new ArrayList<ObjectIdentity>(objects.size());
for (Object domainObject : objects) {