From a1886bd1e07ba0df54a3e1e71afe0542e9e66e31 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Thu, 22 Feb 2007 23:57:49 +0000 Subject: [PATCH] Made string constant RECIPIENT_FOR_CACHE_EMPTY final. --- .../acl/basic/BasicAclProvider.java | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/core/src/main/java/org/acegisecurity/acl/basic/BasicAclProvider.java b/core/src/main/java/org/acegisecurity/acl/basic/BasicAclProvider.java index ccbf7e3c9b..71e9591096 100644 --- a/core/src/main/java/org/acegisecurity/acl/basic/BasicAclProvider.java +++ b/core/src/main/java/org/acegisecurity/acl/basic/BasicAclProvider.java @@ -36,18 +36,24 @@ import java.util.Map; /** - *

Retrieves access control lists (ACL) entries for domain object instances from a data access object (DAO).

- *

This implementation will provide ACL lookup services for any object that it can determine the {@link + * Retrieves access control lists (ACL) entries for domain object instances from a data access object (DAO). + *

+ * This implementation will provide ACL lookup services for any object that it can determine the {@link * AclObjectIdentity} for by calling the {@link #obtainIdentity(Object)} method. Subclasses can override this method - * if they only want the BasicAclProvider responding to particular domain object instances.

- *

BasicAclProvider will walk an inheritance hierarchy if a BasicAclEntry returned by - * the DAO indicates it has a parent. NB: inheritance occurs at a domain instance object level. It does not - * occur at an ACL recipient level. This means allBasicAclEntrys for a given domain instance - * object must have the same parent identity, or allBasicAclEntrys must have - * null as their parent identity.

- *

A cache should be used. This is provided by the {@link BasicAclEntryCache}. BasicAclProvider by - * default is setup to use the {@link NullAclEntryCache}, which performs no caching.

- *

To implement the {@link #getAcls(Object, Authentication)} method, BasicAclProvider requires a + * if they only want the BasicAclProvider responding to particular domain object instances. + *

+ *

+ * BasicAclProvider will walk an inheritance hierarchy if a BasicAclEntry returned by + * the DAO indicates it has a parent. NB: inheritance occurs at a domain instance object level. It does not + * occur at an ACL recipient level. This means allBasicAclEntrys for a given domain instance + * object must have the same parent identity, or allBasicAclEntrys must have + * null as their parent identity. + *

+ *

+ * A cache should be used. This is provided by the {@link BasicAclEntryCache}. BasicAclProvider by + * default is setup to use the {@link NullAclEntryCache}, which performs no caching. + *

+ *

To implement the {@link #getAcls(Object, Authentication)} method, BasicAclProvider requires a * {@link EffectiveAclsResolver} to be configured against it. By default the {@link * GrantedAuthorityEffectiveAclsResolver} is used.

* @@ -60,7 +66,7 @@ public class BasicAclProvider implements AclProvider, InitializingBean { private static final Log logger = LogFactory.getLog(BasicAclProvider.class); /** Marker added to the cache to indicate an AclObjectIdentity has no corresponding BasicAclEntry[]s */ - private static String RECIPIENT_FOR_CACHE_EMPTY = "RESERVED_RECIPIENT_NOBODY"; + private static final String RECIPIENT_FOR_CACHE_EMPTY = "RESERVED_RECIPIENT_NOBODY"; //~ Instance fields ================================================================================================ @@ -237,7 +243,8 @@ public class BasicAclProvider implements AclProvider, InitializingBean { Constructor constructor = defaultAclObjectIdentityClass.getConstructor(new Class[] {Object.class}); if (logger.isDebugEnabled()) { - logger.debug("domainInstance: " + domainInstance + " attempting to pass to constructor: " + constructor); + logger.debug("domainInstance: " + domainInstance + + " attempting to pass to constructor: " + constructor); } return (AclObjectIdentity) constructor.newInstance(new Object[] {domainInstance});