SEC-1557: Added getter to DelegatingMethodSecurityMetadataSource. Also added some optimizations of cache lookup key equals method. A class type check is unnecessary since the key class is a private inner class.

This commit is contained in:
Luke Taylor
2010-12-01 21:55:33 +00:00
parent 441aa25383
commit bfb723feac
2 changed files with 60 additions and 6 deletions

View File

@@ -85,6 +85,10 @@ public final class DelegatingMethodSecurityMetadataSource extends AbstractMethod
return set;
}
public List<MethodSecurityMetadataSource> getMethodSecurityMetadataSources() {
return methodSecurityMetadataSources;
}
//~ Inner Classes ==================================================================================================
private static class DefaultCacheKey {
@@ -97,12 +101,6 @@ public final class DelegatingMethodSecurityMetadataSource extends AbstractMethod
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof DefaultCacheKey)) {
return false;
}
DefaultCacheKey otherKey = (DefaultCacheKey) other;
return (this.method.equals(otherKey.method) &&
ObjectUtils.nullSafeEquals(this.targetClass, otherKey.targetClass));