Add missing @Override annotations

This commit also adds MissingOverrideCheck module to Checkstyle configuration.
This commit is contained in:
Johnny Lim 2017-11-01 22:28:29 +09:00 committed by Rob Winch
parent be0c6cde3d
commit 99df632f24
44 changed files with 184 additions and 4 deletions

View File

@ -64,6 +64,7 @@ public class AccessControlEntryImpl implements AccessControlEntry,
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public boolean equals(Object arg0) { public boolean equals(Object arg0) {
if (!(arg0 instanceof AccessControlEntryImpl)) { if (!(arg0 instanceof AccessControlEntryImpl)) {
return false; return false;
@ -140,30 +141,37 @@ public class AccessControlEntryImpl implements AccessControlEntry,
return result; return result;
} }
@Override
public Acl getAcl() { public Acl getAcl() {
return acl; return acl;
} }
@Override
public Serializable getId() { public Serializable getId() {
return id; return id;
} }
@Override
public Permission getPermission() { public Permission getPermission() {
return permission; return permission;
} }
@Override
public Sid getSid() { public Sid getSid() {
return sid; return sid;
} }
@Override
public boolean isAuditFailure() { public boolean isAuditFailure() {
return auditFailure; return auditFailure;
} }
@Override
public boolean isAuditSuccess() { public boolean isAuditSuccess() {
return auditSuccess; return auditSuccess;
} }
@Override
public boolean isGranting() { public boolean isGranting() {
return granting; return granting;
} }
@ -181,6 +189,7 @@ public class AccessControlEntryImpl implements AccessControlEntry,
this.permission = permission; this.permission = permission;
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("AccessControlEntryImpl["); sb.append("AccessControlEntryImpl[");

View File

@ -123,6 +123,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public void deleteAce(int aceIndex) throws NotFoundException { public void deleteAce(int aceIndex) throws NotFoundException {
aclAuthorizationStrategy.securityCheck(this, aclAuthorizationStrategy.securityCheck(this,
AclAuthorizationStrategy.CHANGE_GENERAL); AclAuthorizationStrategy.CHANGE_GENERAL);
@ -144,6 +145,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
} }
} }
@Override
public void insertAce(int atIndexLocation, Permission permission, Sid sid, public void insertAce(int atIndexLocation, Permission permission, Sid sid,
boolean granting) throws NotFoundException { boolean granting) throws NotFoundException {
aclAuthorizationStrategy.securityCheck(this, aclAuthorizationStrategy.securityCheck(this,
@ -167,20 +169,24 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
} }
} }
@Override
public List<AccessControlEntry> getEntries() { public List<AccessControlEntry> getEntries() {
// Can safely return AccessControlEntry directly, as they're immutable outside the // Can safely return AccessControlEntry directly, as they're immutable outside the
// ACL package // ACL package
return new ArrayList<AccessControlEntry>(aces); return new ArrayList<AccessControlEntry>(aces);
} }
@Override
public Serializable getId() { public Serializable getId() {
return this.id; return this.id;
} }
@Override
public ObjectIdentity getObjectIdentity() { public ObjectIdentity getObjectIdentity() {
return objectIdentity; return objectIdentity;
} }
@Override
public boolean isEntriesInheriting() { public boolean isEntriesInheriting() {
return entriesInheriting; return entriesInheriting;
} }
@ -192,6 +198,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
* ACL was only loaded for a subset of SIDs * ACL was only loaded for a subset of SIDs
* @see DefaultPermissionGrantingStrategy * @see DefaultPermissionGrantingStrategy
*/ */
@Override
public boolean isGranted(List<Permission> permission, List<Sid> sids, public boolean isGranted(List<Permission> permission, List<Sid> sids,
boolean administrativeMode) throws NotFoundException, UnloadedSidException { boolean administrativeMode) throws NotFoundException, UnloadedSidException {
Assert.notEmpty(permission, "Permissions required"); Assert.notEmpty(permission, "Permissions required");
@ -205,6 +212,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
administrativeMode); administrativeMode);
} }
@Override
public boolean isSidLoaded(List<Sid> sids) { public boolean isSidLoaded(List<Sid> sids) {
// If loadedSides is null, this indicates all SIDs were loaded // If loadedSides is null, this indicates all SIDs were loaded
// Also return true if the caller didn't specify a SID to find // Also return true if the caller didn't specify a SID to find
@ -233,12 +241,14 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
return true; return true;
} }
@Override
public void setEntriesInheriting(boolean entriesInheriting) { public void setEntriesInheriting(boolean entriesInheriting) {
aclAuthorizationStrategy.securityCheck(this, aclAuthorizationStrategy.securityCheck(this,
AclAuthorizationStrategy.CHANGE_GENERAL); AclAuthorizationStrategy.CHANGE_GENERAL);
this.entriesInheriting = entriesInheriting; this.entriesInheriting = entriesInheriting;
} }
@Override
public void setOwner(Sid newOwner) { public void setOwner(Sid newOwner) {
aclAuthorizationStrategy.securityCheck(this, aclAuthorizationStrategy.securityCheck(this,
AclAuthorizationStrategy.CHANGE_OWNERSHIP); AclAuthorizationStrategy.CHANGE_OWNERSHIP);
@ -246,10 +256,12 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
this.owner = newOwner; this.owner = newOwner;
} }
@Override
public Sid getOwner() { public Sid getOwner() {
return this.owner; return this.owner;
} }
@Override
public void setParent(Acl newParent) { public void setParent(Acl newParent) {
aclAuthorizationStrategy.securityCheck(this, aclAuthorizationStrategy.securityCheck(this,
AclAuthorizationStrategy.CHANGE_GENERAL); AclAuthorizationStrategy.CHANGE_GENERAL);
@ -258,10 +270,12 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
this.parentAcl = newParent; this.parentAcl = newParent;
} }
@Override
public Acl getParentAcl() { public Acl getParentAcl() {
return parentAcl; return parentAcl;
} }
@Override
public void updateAce(int aceIndex, Permission permission) throws NotFoundException { public void updateAce(int aceIndex, Permission permission) throws NotFoundException {
aclAuthorizationStrategy.securityCheck(this, aclAuthorizationStrategy.securityCheck(this,
AclAuthorizationStrategy.CHANGE_GENERAL); AclAuthorizationStrategy.CHANGE_GENERAL);
@ -273,6 +287,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
} }
} }
@Override
public void updateAuditing(int aceIndex, boolean auditSuccess, boolean auditFailure) { public void updateAuditing(int aceIndex, boolean auditSuccess, boolean auditFailure) {
aclAuthorizationStrategy.securityCheck(this, aclAuthorizationStrategy.securityCheck(this,
AclAuthorizationStrategy.CHANGE_AUDITING); AclAuthorizationStrategy.CHANGE_AUDITING);
@ -285,6 +300,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
} }
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof AclImpl) { if (obj instanceof AclImpl) {
AclImpl rhs = (AclImpl) obj; AclImpl rhs = (AclImpl) obj;
@ -341,6 +357,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
return result; return result;
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("AclImpl["); sb.append("AclImpl[");

View File

@ -55,6 +55,7 @@ public class GrantedAuthoritySid implements Sid {
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public boolean equals(Object object) { public boolean equals(Object object) {
if ((object == null) || !(object instanceof GrantedAuthoritySid)) { if ((object == null) || !(object instanceof GrantedAuthoritySid)) {
return false; return false;
@ -66,6 +67,7 @@ public class GrantedAuthoritySid implements Sid {
this.getGrantedAuthority()); this.getGrantedAuthority());
} }
@Override
public int hashCode() { public int hashCode() {
return this.getGrantedAuthority().hashCode(); return this.getGrantedAuthority().hashCode();
} }
@ -74,6 +76,7 @@ public class GrantedAuthoritySid implements Sid {
return grantedAuthority; return grantedAuthority;
} }
@Override
public String toString() { public String toString() {
return "GrantedAuthoritySid[" + this.grantedAuthority + "]"; return "GrantedAuthoritySid[" + this.grantedAuthority + "]";
} }

View File

@ -110,6 +110,7 @@ public class ObjectIdentityImpl implements ObjectIdentity {
* *
* @return <code>true</code> if the presented object matches this object * @return <code>true</code> if the presented object matches this object
*/ */
@Override
public boolean equals(Object arg0) { public boolean equals(Object arg0) {
if (arg0 == null || !(arg0 instanceof ObjectIdentityImpl)) { if (arg0 == null || !(arg0 instanceof ObjectIdentityImpl)) {
return false; return false;
@ -134,10 +135,12 @@ public class ObjectIdentityImpl implements ObjectIdentity {
return type.equals(other.type); return type.equals(other.type);
} }
@Override
public Serializable getIdentifier() { public Serializable getIdentifier() {
return identifier; return identifier;
} }
@Override
public String getType() { public String getType() {
return type; return type;
} }
@ -147,6 +150,7 @@ public class ObjectIdentityImpl implements ObjectIdentity {
* *
* @return the hash * @return the hash
*/ */
@Override
public int hashCode() { public int hashCode() {
int code = 31; int code = 31;
code ^= this.type.hashCode(); code ^= this.type.hashCode();
@ -155,6 +159,7 @@ public class ObjectIdentityImpl implements ObjectIdentity {
return code; return code;
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(this.getClass().getName()).append("["); sb.append(this.getClass().getName()).append("[");

View File

@ -60,6 +60,7 @@ public class PrincipalSid implements Sid {
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public boolean equals(Object object) { public boolean equals(Object object) {
if ((object == null) || !(object instanceof PrincipalSid)) { if ((object == null) || !(object instanceof PrincipalSid)) {
return false; return false;
@ -70,6 +71,7 @@ public class PrincipalSid implements Sid {
return ((PrincipalSid) object).getPrincipal().equals(this.getPrincipal()); return ((PrincipalSid) object).getPrincipal().equals(this.getPrincipal());
} }
@Override
public int hashCode() { public int hashCode() {
return this.getPrincipal().hashCode(); return this.getPrincipal().hashCode();
} }
@ -78,6 +80,7 @@ public class PrincipalSid implements Sid {
return principal; return principal;
} }
@Override
public String toString() { public String toString() {
return "PrincipalSid[" + this.principal + "]"; return "PrincipalSid[" + this.principal + "]";
} }

View File

@ -122,6 +122,7 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
return key.hashCode(); return key.hashCode();
} }
@Override
public boolean equals(final Object obj) { public boolean equals(final Object obj) {
if (!super.equals(obj)) { if (!super.equals(obj)) {
return false; return false;
@ -155,6 +156,7 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
return result; return result;
} }
@Override
public Object getCredentials() { public Object getCredentials() {
return this.credentials; return this.credentials;
} }
@ -163,6 +165,7 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
return this.keyHash; return this.keyHash;
} }
@Override
public Object getPrincipal() { public Object getPrincipal() {
return this.principal; return this.principal;
} }
@ -175,6 +178,7 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
return userDetails; return userDetails;
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(super.toString()); sb.append(super.toString());

View File

@ -86,6 +86,7 @@ public class HttpSecurityBeanDefinitionParser implements BeanDefinitionParser {
* "universal" match pattern mapped to the list of beans which have been parsed here. * "universal" match pattern mapped to the list of beans which have been parsed here.
*/ */
@SuppressWarnings({ "unchecked" }) @SuppressWarnings({ "unchecked" })
@Override
public BeanDefinition parse(Element element, ParserContext pc) { public BeanDefinition parse(Element element, ParserContext pc) {
CompositeComponentDefinition compositeDef = new CompositeComponentDefinition( CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(
element.getTagName(), pc.extractSource(element)); element.getTagName(), pc.extractSource(element));
@ -424,10 +425,12 @@ class OrderDecorator implements Ordered {
this.order = order; this.order = order;
} }
@Override
public int getOrder() { public int getOrder() {
return order; return order;
} }
@Override
public String toString() { public String toString() {
return bean + ", order = " + order; return bean + ", order = " + order;
} }
@ -443,6 +446,7 @@ class OrderDecorator implements Ordered {
* @author Rob Winch * @author Rob Winch
*/ */
final class ClearCredentialsMethodInvokingFactoryBean extends MethodInvokingFactoryBean { final class ClearCredentialsMethodInvokingFactoryBean extends MethodInvokingFactoryBean {
@Override
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
boolean isTargetProviderManager = getTargetObject() instanceof ProviderManager; boolean isTargetProviderManager = getTargetObject() instanceof ProviderManager;
if (!isTargetProviderManager) { if (!isTargetProviderManager) {
@ -465,4 +469,4 @@ final class ClearCredentialsMethodInvokingFactoryBean extends MethodInvokingFact
public boolean isEraseCredentialsAfterAuthentication() { public boolean isEraseCredentialsAfterAuthentication() {
return false; return false;
} }
} }

View File

@ -44,6 +44,7 @@ public class SecurityConfig implements ConfigAttribute {
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof ConfigAttribute) { if (obj instanceof ConfigAttribute) {
ConfigAttribute attr = (ConfigAttribute) obj; ConfigAttribute attr = (ConfigAttribute) obj;
@ -54,14 +55,17 @@ public class SecurityConfig implements ConfigAttribute {
return false; return false;
} }
@Override
public String getAttribute() { public String getAttribute() {
return this.attrib; return this.attrib;
} }
@Override
public int hashCode() { public int hashCode() {
return this.attrib.hashCode(); return this.attrib.hashCode();
} }
@Override
public String toString() { public String toString() {
return this.attrib; return this.attrib;
} }

View File

@ -58,6 +58,7 @@ public class RunAsUserToken extends AbstractAuthenticationToken {
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public Object getCredentials() { public Object getCredentials() {
return this.credentials; return this.credentials;
} }
@ -70,10 +71,12 @@ public class RunAsUserToken extends AbstractAuthenticationToken {
return this.originalAuthentication; return this.originalAuthentication;
} }
@Override
public Object getPrincipal() { public Object getPrincipal() {
return this.principal; return this.principal;
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(super.toString()); StringBuilder sb = new StringBuilder(super.toString());
String className = this.originalAuthentication == null ? null String className = this.originalAuthentication == null ? null

View File

@ -93,6 +93,7 @@ public final class DelegatingMethodSecurityMetadataSource extends
} }
} }
@Override
public Collection<ConfigAttribute> getAllConfigAttributes() { public Collection<ConfigAttribute> getAllConfigAttributes() {
Set<ConfigAttribute> set = new HashSet<ConfigAttribute>(); Set<ConfigAttribute> set = new HashSet<ConfigAttribute>();
for (MethodSecurityMetadataSource s : methodSecurityMetadataSources) { for (MethodSecurityMetadataSource s : methodSecurityMetadataSources) {
@ -120,17 +121,20 @@ public final class DelegatingMethodSecurityMetadataSource extends
this.targetClass = targetClass; this.targetClass = targetClass;
} }
@Override
public boolean equals(Object other) { public boolean equals(Object other) {
DefaultCacheKey otherKey = (DefaultCacheKey) other; DefaultCacheKey otherKey = (DefaultCacheKey) other;
return (this.method.equals(otherKey.method) && ObjectUtils.nullSafeEquals( return (this.method.equals(otherKey.method) && ObjectUtils.nullSafeEquals(
this.targetClass, otherKey.targetClass)); this.targetClass, otherKey.targetClass));
} }
@Override
public int hashCode() { public int hashCode() {
return this.method.hashCode() * 21 return this.method.hashCode() * 21
+ (this.targetClass != null ? this.targetClass.hashCode() : 0); + (this.targetClass != null ? this.targetClass.hashCode() : 0);
} }
@Override
public String toString() { public String toString() {
return "CacheKey[" + (targetClass == null ? "-" : targetClass.getName()) return "CacheKey[" + (targetClass == null ? "-" : targetClass.getName())
+ "; " + method + "]"; + "; " + method + "]";

View File

@ -75,6 +75,7 @@ public class MapBasedMethodSecurityMetadataSource extends
/** /**
* Implementation does not support class-level attributes. * Implementation does not support class-level attributes.
*/ */
@Override
protected Collection<ConfigAttribute> findAttributes(Class<?> clazz) { protected Collection<ConfigAttribute> findAttributes(Class<?> clazz) {
return null; return null;
} }
@ -83,6 +84,7 @@ public class MapBasedMethodSecurityMetadataSource extends
* Will walk the method inheritance tree to find the most specific declaration * Will walk the method inheritance tree to find the most specific declaration
* applicable. * applicable.
*/ */
@Override
protected Collection<ConfigAttribute> findAttributes(Method method, protected Collection<ConfigAttribute> findAttributes(Method method,
Class<?> targetClass) { Class<?> targetClass) {
if (targetClass == null) { if (targetClass == null) {
@ -232,6 +234,7 @@ public class MapBasedMethodSecurityMetadataSource extends
* *
* @return the attributes explicitly defined against this bean * @return the attributes explicitly defined against this bean
*/ */
@Override
public Collection<ConfigAttribute> getAllConfigAttributes() { public Collection<ConfigAttribute> getAllConfigAttributes() {
Set<ConfigAttribute> allAttributes = new HashSet<ConfigAttribute>(); Set<ConfigAttribute> allAttributes = new HashSet<ConfigAttribute>();
@ -258,6 +261,7 @@ public class MapBasedMethodSecurityMetadataSource extends
.substring(1, mappedName.length()))); .substring(1, mappedName.length())));
} }
@Override
public void setBeanClassLoader(ClassLoader beanClassLoader) { public void setBeanClassLoader(ClassLoader beanClassLoader) {
Assert.notNull(beanClassLoader, "Bean class loader required"); Assert.notNull(beanClassLoader, "Bean class loader required");
this.beanClassLoader = beanClassLoader; this.beanClassLoader = beanClassLoader;
@ -290,6 +294,7 @@ public class MapBasedMethodSecurityMetadataSource extends
this.registeredJavaType = registeredJavaType; this.registeredJavaType = registeredJavaType;
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) { if (this == obj) {
return true; return true;
@ -302,10 +307,12 @@ public class MapBasedMethodSecurityMetadataSource extends
return false; return false;
} }
@Override
public int hashCode() { public int hashCode() {
return method.hashCode() * registeredJavaType.hashCode(); return method.hashCode() * registeredJavaType.hashCode();
} }
@Override
public String toString() { public String toString() {
return "RegisteredMethod[" + registeredJavaType.getName() + "; " + method return "RegisteredMethod[" + registeredJavaType.getName() + "; " + method
+ "]"; + "]";

View File

@ -82,6 +82,7 @@ public class AnonymousAuthenticationToken extends AbstractAuthenticationToken im
return key.hashCode(); return key.hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (!super.equals(obj)) { if (!super.equals(obj)) {
return false; return false;
@ -112,6 +113,7 @@ public class AnonymousAuthenticationToken extends AbstractAuthenticationToken im
* *
* @return an empty String * @return an empty String
*/ */
@Override
public Object getCredentials() { public Object getCredentials() {
return ""; return "";
} }
@ -120,6 +122,7 @@ public class AnonymousAuthenticationToken extends AbstractAuthenticationToken im
return this.keyHash; return this.keyHash;
} }
@Override
public Object getPrincipal() { public Object getPrincipal() {
return this.principal; return this.principal;
} }

View File

@ -90,6 +90,7 @@ public class RememberMeAuthenticationToken extends AbstractAuthenticationToken {
* *
* @return an empty String * @return an empty String
*/ */
@Override
public Object getCredentials() { public Object getCredentials() {
return ""; return "";
} }
@ -98,10 +99,12 @@ public class RememberMeAuthenticationToken extends AbstractAuthenticationToken {
return this.keyHash; return this.keyHash;
} }
@Override
public Object getPrincipal() { public Object getPrincipal() {
return this.principal; return this.principal;
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (!super.equals(obj)) { if (!super.equals(obj)) {
return false; return false;

View File

@ -48,14 +48,17 @@ public final class JaasGrantedAuthority implements GrantedAuthority {
return principal; return principal;
} }
@Override
public String getAuthority() { public String getAuthority() {
return role; return role;
} }
@Override
public int hashCode() { public int hashCode() {
return 31 ^ principal.hashCode() ^ role.hashCode(); return 31 ^ principal.hashCode() ^ role.hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) { if (this == obj) {
return true; return true;
@ -69,6 +72,7 @@ public final class JaasGrantedAuthority implements GrantedAuthority {
return false; return false;
} }
@Override
public String toString() { public String toString() {
return "Jaas Authority [" + role + "," + principal + "]"; return "Jaas Authority [" + role + "," + principal + "]";
} }

View File

@ -78,6 +78,7 @@ public final class DelegatingSecurityContextCallable<V> implements Callable<V> {
this(delegate, SecurityContextHolder.getContext()); this(delegate, SecurityContextHolder.getContext());
} }
@Override
public V call() throws Exception { public V call() throws Exception {
this.originalSecurityContext = SecurityContextHolder.getContext(); this.originalSecurityContext = SecurityContextHolder.getContext();
@ -96,6 +97,7 @@ public final class DelegatingSecurityContextCallable<V> implements Callable<V> {
} }
} }
@Override
public String toString() { public String toString() {
return delegate.toString(); return delegate.toString();
} }

View File

@ -75,6 +75,7 @@ public final class DelegatingSecurityContextRunnable implements Runnable {
this(delegate, SecurityContextHolder.getContext()); this(delegate, SecurityContextHolder.getContext());
} }
@Override
public void run() { public void run() {
this.originalSecurityContext = SecurityContextHolder.getContext(); this.originalSecurityContext = SecurityContextHolder.getContext();
@ -93,6 +94,7 @@ public final class DelegatingSecurityContextRunnable implements Runnable {
} }
} }
@Override
public String toString() { public String toString() {
return delegate.toString(); return delegate.toString();
} }

View File

@ -121,14 +121,17 @@ class ComparableVersion implements Comparable<ComparableVersion> {
this.value = new BigInteger(str); this.value = new BigInteger(str);
} }
@Override
public int getType() { public int getType() {
return INTEGER_ITEM; return INTEGER_ITEM;
} }
@Override
public boolean isNull() { public boolean isNull() {
return BigInteger_ZERO.equals(value); return BigInteger_ZERO.equals(value);
} }
@Override
public int compareTo(Item item) { public int compareTo(Item item) {
if (item == null) { if (item == null) {
return BigInteger_ZERO.equals(value) ? 0 : 1; // 1.0 == 1, 1.1 > 1 return BigInteger_ZERO.equals(value) ? 0 : 1; // 1.0 == 1, 1.1 > 1
@ -149,6 +152,7 @@ class ComparableVersion implements Comparable<ComparableVersion> {
} }
} }
@Override
public String toString() { public String toString() {
return value.toString(); return value.toString();
} }
@ -198,10 +202,12 @@ class ComparableVersion implements Comparable<ComparableVersion> {
this.value = ALIASES.getProperty(value, value); this.value = ALIASES.getProperty(value, value);
} }
@Override
public int getType() { public int getType() {
return STRING_ITEM; return STRING_ITEM;
} }
@Override
public boolean isNull() { public boolean isNull() {
return (comparableQualifier(value).compareTo(RELEASE_VERSION_INDEX) == 0); return (comparableQualifier(value).compareTo(RELEASE_VERSION_INDEX) == 0);
} }
@ -226,6 +232,7 @@ class ComparableVersion implements Comparable<ComparableVersion> {
return i == -1 ? (_QUALIFIERS.size() + "-" + qualifier) : String.valueOf(i); return i == -1 ? (_QUALIFIERS.size() + "-" + qualifier) : String.valueOf(i);
} }
@Override
public int compareTo(Item item) { public int compareTo(Item item) {
if (item == null) { if (item == null) {
// 1-rc < 1, 1-ga > 1 // 1-rc < 1, 1-ga > 1
@ -247,6 +254,7 @@ class ComparableVersion implements Comparable<ComparableVersion> {
} }
} }
@Override
public String toString() { public String toString() {
return value; return value;
} }
@ -257,10 +265,12 @@ class ComparableVersion implements Comparable<ComparableVersion> {
* and for sub-lists (which start with '-(number)' in the version specification). * and for sub-lists (which start with '-(number)' in the version specification).
*/ */
private static class ListItem extends ArrayList<Item> implements Item { private static class ListItem extends ArrayList<Item> implements Item {
@Override
public int getType() { public int getType() {
return LIST_ITEM; return LIST_ITEM;
} }
@Override
public boolean isNull() { public boolean isNull() {
return (size() == 0); return (size() == 0);
} }
@ -278,6 +288,7 @@ class ComparableVersion implements Comparable<ComparableVersion> {
} }
} }
@Override
public int compareTo(Item item) { public int compareTo(Item item) {
if (item == null) { if (item == null) {
if (size() == 0) { if (size() == 0) {
@ -316,6 +327,7 @@ class ComparableVersion implements Comparable<ComparableVersion> {
} }
} }
@Override
public String toString() { public String toString() {
StringBuilder buffer = new StringBuilder("("); StringBuilder buffer = new StringBuilder("(");
for (Iterator<Item> iter = iterator(); iter.hasNext();) { for (Iterator<Item> iter = iterator(); iter.hasNext();) {
@ -418,20 +430,24 @@ class ComparableVersion implements Comparable<ComparableVersion> {
return isDigit ? new IntegerItem(buf) : new StringItem(buf, false); return isDigit ? new IntegerItem(buf) : new StringItem(buf, false);
} }
@Override
public int compareTo(ComparableVersion o) { public int compareTo(ComparableVersion o) {
return items.compareTo(o.items); return items.compareTo(o.items);
} }
@Override
public String toString() { public String toString() {
return value; return value;
} }
@Override
public boolean equals(Object o) { public boolean equals(Object o) {
return (o instanceof ComparableVersion) return (o instanceof ComparableVersion)
&& canonical.equals(((ComparableVersion) o).canonical); && canonical.equals(((ComparableVersion) o).canonical);
} }
@Override
public int hashCode() { public int hashCode() {
return canonical.hashCode(); return canonical.hashCode();
} }
} }

View File

@ -39,10 +39,12 @@ public final class SimpleGrantedAuthority implements GrantedAuthority {
this.role = role; this.role = role;
} }
@Override
public String getAuthority() { public String getAuthority() {
return role; return role;
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) { if (this == obj) {
return true; return true;
@ -55,10 +57,12 @@ public final class SimpleGrantedAuthority implements GrantedAuthority {
return false; return false;
} }
@Override
public int hashCode() { public int hashCode() {
return this.role.hashCode(); return this.role.hashCode();
} }
@Override
public String toString() { public String toString() {
return this.role; return this.role;
} }

View File

@ -161,6 +161,7 @@ public class SecurityContextHolder {
return strategy.createEmptyContext(); return strategy.createEmptyContext();
} }
@Override
public String toString() { public String toString() {
return "SecurityContextHolder[strategy='" + strategyName + "'; initializeCount=" return "SecurityContextHolder[strategy='" + strategyName + "'; initializeCount="
+ initializeCount + "]"; + initializeCount + "]";

View File

@ -44,6 +44,7 @@ public class SecurityContextImpl implements SecurityContext {
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof SecurityContextImpl) { if (obj instanceof SecurityContextImpl) {
SecurityContextImpl test = (SecurityContextImpl) obj; SecurityContextImpl test = (SecurityContextImpl) obj;
@ -61,10 +62,12 @@ public class SecurityContextImpl implements SecurityContext {
return false; return false;
} }
@Override
public Authentication getAuthentication() { public Authentication getAuthentication() {
return authentication; return authentication;
} }
@Override
public int hashCode() { public int hashCode() {
if (this.authentication == null) { if (this.authentication == null) {
return -1; return -1;
@ -74,10 +77,12 @@ public class SecurityContextImpl implements SecurityContext {
} }
} }
@Override
public void setAuthentication(Authentication authentication) { public void setAuthentication(Authentication authentication) {
this.authentication = authentication; this.authentication = authentication;
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(super.toString()); sb.append(super.toString());

View File

@ -38,18 +38,22 @@ public class DefaultToken implements Token {
this.extendedInformation = extendedInformation; this.extendedInformation = extendedInformation;
} }
@Override
public String getKey() { public String getKey() {
return key; return key;
} }
@Override
public long getKeyCreationTime() { public long getKeyCreationTime() {
return keyCreationTime; return keyCreationTime;
} }
@Override
public String getExtendedInformation() { public String getExtendedInformation() {
return extendedInformation; return extendedInformation;
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj != null && obj instanceof DefaultToken) { if (obj != null && obj instanceof DefaultToken) {
DefaultToken rhs = (DefaultToken) obj; DefaultToken rhs = (DefaultToken) obj;
@ -60,6 +64,7 @@ public class DefaultToken implements Token {
return false; return false;
} }
@Override
public int hashCode() { public int hashCode() {
int code = 979; int code = 979;
code = code * key.hashCode(); code = code * key.hashCode();
@ -68,6 +73,7 @@ public class DefaultToken implements Token {
return code; return code;
} }
@Override
public String toString() { public String toString() {
return "DefaultToken[key=" + key + "; creation=" + new Date(keyCreationTime) return "DefaultToken[key=" + key + "; creation=" + new Date(keyCreationTime)
+ "; extended=" + extendedInformation + "]"; + "; extended=" + extendedInformation + "]";

View File

@ -60,18 +60,22 @@ public class InMemoryResource extends AbstractResource {
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public String getDescription() { public String getDescription() {
return description; return description;
} }
@Override
public InputStream getInputStream() throws IOException { public InputStream getInputStream() throws IOException {
return new ByteArrayInputStream(source); return new ByteArrayInputStream(source);
} }
@Override
public int hashCode() { public int hashCode() {
return 1; return 1;
} }
@Override
public boolean equals(Object res) { public boolean equals(Object res) {
if (!(res instanceof InMemoryResource)) { if (!(res instanceof InMemoryResource)) {
return false; return false;

View File

@ -6,7 +6,7 @@
<module name="SuppressionFilter"> <module name="SuppressionFilter">
<property name="file" value="${configDir}/suppressions.xml"/> <property name="file" value="${configDir}/suppressions.xml"/>
</module> </module>
<!-- Root Checks --> <!-- Root Checks -->
<module name="RegexpHeader"> <module name="RegexpHeader">
<property name="headerFile" value="${configDir}/header.txt"/> <property name="headerFile" value="${configDir}/header.txt"/>
@ -15,6 +15,9 @@
<!-- Root Checks --> <!-- Root Checks -->
<module name="TreeWalker"> <module name="TreeWalker">
<!-- Annotations -->
<module name="MissingOverrideCheck"/>
<!-- Regexp --> <!-- Regexp -->
<module name="RegexpSinglelineJava"> <module name="RegexpSinglelineJava">
<property name="format" value="^\t* +\t*\S"/> <property name="format" value="^\t* +\t*\S"/>

View File

@ -111,6 +111,7 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
* *
* @throws UsernameNotFoundException if no matching entry is found. * @throws UsernameNotFoundException if no matching entry is found.
*/ */
@Override
public DirContextOperations searchForUser(String username) { public DirContextOperations searchForUser(String username) {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("Searching for user '" + username + "', with user search " logger.debug("Searching for user '" + username + "', with user search "
@ -183,6 +184,7 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
searchControls.setReturningAttributes(attrs); searchControls.setReturningAttributes(attrs);
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();

View File

@ -114,6 +114,7 @@ public class LdapAuthority implements GrantedAuthority {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public String getAuthority() { public String getAuthority() {
return role; return role;
} }

View File

@ -75,34 +75,42 @@ public class LdapUserDetailsImpl implements LdapUserDetails, PasswordPolicyData
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public Collection<GrantedAuthority> getAuthorities() { public Collection<GrantedAuthority> getAuthorities() {
return authorities; return authorities;
} }
@Override
public String getDn() { public String getDn() {
return dn; return dn;
} }
@Override
public String getPassword() { public String getPassword() {
return password; return password;
} }
@Override
public String getUsername() { public String getUsername() {
return username; return username;
} }
@Override
public boolean isAccountNonExpired() { public boolean isAccountNonExpired() {
return accountNonExpired; return accountNonExpired;
} }
@Override
public boolean isAccountNonLocked() { public boolean isAccountNonLocked() {
return accountNonLocked; return accountNonLocked;
} }
@Override
public boolean isCredentialsNonExpired() { public boolean isCredentialsNonExpired() {
return credentialsNonExpired; return credentialsNonExpired;
} }
@Override
public boolean isEnabled() { public boolean isEnabled() {
return enabled; return enabled;
} }
@ -112,10 +120,12 @@ public class LdapUserDetailsImpl implements LdapUserDetails, PasswordPolicyData
password = null; password = null;
} }
@Override
public int getTimeBeforeExpiration() { public int getTimeBeforeExpiration() {
return timeBeforeExpiration; return timeBeforeExpiration;
} }
@Override
public int getGraceLoginsRemaining() { public int getGraceLoginsRemaining() {
return graceLoginsRemaining; return graceLoginsRemaining;
} }
@ -133,6 +143,7 @@ public class LdapUserDetailsImpl implements LdapUserDetails, PasswordPolicyData
return dn.hashCode(); return dn.hashCode();
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(super.toString()).append(": "); sb.append(super.toString()).append(": ");

View File

@ -36,10 +36,12 @@ public interface MessageMatcher<T> {
* Matches every {@link Message} * Matches every {@link Message}
*/ */
MessageMatcher<Object> ANY_MESSAGE = new MessageMatcher<Object>() { MessageMatcher<Object> ANY_MESSAGE = new MessageMatcher<Object>() {
@Override
public boolean matches(Message<? extends Object> message) { public boolean matches(Message<? extends Object> message) {
return true; return true;
} }
@Override
public String toString() { public String toString() {
return "ANY_MESSAGE"; return "ANY_MESSAGE";
} }

View File

@ -44,6 +44,7 @@ public class SimpMessageTypeMatcher implements MessageMatcher<Object> {
this.typeToMatch = typeToMatch; this.typeToMatch = typeToMatch;
} }
@Override
public boolean matches(Message<? extends Object> message) { public boolean matches(Message<? extends Object> message) {
MessageHeaders headers = message.getHeaders(); MessageHeaders headers = message.getHeaders();
SimpMessageType messageType = SimpMessageHeaderAccessor.getMessageType(headers); SimpMessageType messageType = SimpMessageHeaderAccessor.getMessageType(headers);
@ -64,6 +65,7 @@ public class SimpMessageTypeMatcher implements MessageMatcher<Object> {
} }
@Override
public int hashCode() { public int hashCode() {
// Using nullSafeHashCode for proper array hashCode handling // Using nullSafeHashCode for proper array hashCode handling
return ObjectUtils.nullSafeHashCode(this.typeToMatch); return ObjectUtils.nullSafeHashCode(this.typeToMatch);
@ -73,4 +75,4 @@ public class SimpMessageTypeMatcher implements MessageMatcher<Object> {
public String toString() { public String toString() {
return "SimpMessageTypeMatcher [typeToMatch=" + typeToMatch + "]"; return "SimpMessageTypeMatcher [typeToMatch=" + typeToMatch + "]";
} }
} }

View File

@ -98,6 +98,7 @@ public class OpenIDAttribute implements Serializable {
return values; return values;
} }
@Override
public String toString() { public String toString() {
StringBuilder result = new StringBuilder("["); StringBuilder result = new StringBuilder("[");
result.append(name); result.append(name);

View File

@ -51,6 +51,7 @@ public enum OpenIDAuthenticationStatus {
this.name = name; this.name = name;
} }
@Override
public String toString() { public String toString() {
return name; return name;
} }

View File

@ -84,6 +84,7 @@ public class Contact implements Serializable {
this.name = name; this.name = name;
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(super.toString() + ": "); sb.append(super.toString() + ": ");

View File

@ -31,6 +31,7 @@ public class Directory extends AbstractElement {
super(name, parent); super(name, parent);
} }
@Override
public String toString() { public String toString() {
return "Directory[fullName='" + getFullName() + "'; name='" + getName() return "Directory[fullName='" + getFullName() + "'; name='" + getName()
+ "'; id='" + getId() + "'; parent='" + getParent() + "']"; + "'; id='" + getId() + "'; parent='" + getParent() + "']";

View File

@ -39,6 +39,7 @@ public class File extends AbstractElement {
this.content = content; this.content = content;
} }
@Override
public String toString() { public String toString() {
return "File[fullName='" + getFullName() + "'; name='" + getName() + "'; id='" return "File[fullName='" + getFullName() + "'; name='" + getName() + "'; id='"
+ getId() + "'; content=" + getContent() + "'; parent='" + getParent() + getId() + "'; content=" + getContent() + "'; parent='" + getParent()

View File

@ -44,14 +44,17 @@ public class UsernameEqualsPasswordLoginModule implements LoginModule {
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public boolean abort() throws LoginException { public boolean abort() throws LoginException {
return true; return true;
} }
@Override
public boolean commit() throws LoginException { public boolean commit() throws LoginException {
return true; return true;
} }
@Override
public void initialize(Subject subject, CallbackHandler callbackHandler, public void initialize(Subject subject, CallbackHandler callbackHandler,
Map<String, ?> sharedState, Map<String, ?> options) { Map<String, ?> sharedState, Map<String, ?> options) {
this.subject = subject; this.subject = subject;
@ -70,6 +73,7 @@ public class UsernameEqualsPasswordLoginModule implements LoginModule {
} }
} }
@Override
public boolean login() throws LoginException { public boolean login() throws LoginException {
if (username == null || !username.equals(password)) { if (username == null || !username.equals(password)) {
throw new LoginException("username is not equal to password"); throw new LoginException("username is not equal to password");
@ -82,6 +86,7 @@ public class UsernameEqualsPasswordLoginModule implements LoginModule {
return true; return true;
} }
@Override
public boolean logout() throws LoginException { public boolean logout() throws LoginException {
return true; return true;
} }
@ -93,10 +98,12 @@ public class UsernameEqualsPasswordLoginModule implements LoginModule {
this.username = username; this.username = username;
} }
@Override
public String getName() { public String getName() {
return username; return username;
} }
@Override
public String toString() { public String toString() {
return "Principal [name=" + getName() + "]"; return "Principal [name=" + getName() + "]";
} }

View File

@ -65,6 +65,7 @@ public class Account {
this.overdraft = overdraft; this.overdraft = overdraft;
} }
@Override
public String toString() { public String toString() {
return "Account[id=" + id + ",balance=" + balance + ",holder=" + holder return "Account[id=" + id + ",balance=" + balance + ",holder=" + holder
+ ", overdraft=" + overdraft + "]"; + ", overdraft=" + overdraft + "]";

View File

@ -168,6 +168,7 @@ public class FilterChainProxy extends GenericFilterBean {
filterChainValidator.validate(this); filterChainValidator.validate(this);
} }
@Override
public void doFilter(ServletRequest request, ServletResponse response, public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException { FilterChain chain) throws IOException, ServletException {
boolean clearContext = request.getAttribute(FILTER_APPLIED) == null; boolean clearContext = request.getAttribute(FILTER_APPLIED) == null;
@ -271,6 +272,7 @@ public class FilterChainProxy extends GenericFilterBean {
this.firewall = firewall; this.firewall = firewall;
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("FilterChainProxy["); sb.append("FilterChainProxy[");
@ -303,6 +305,7 @@ public class FilterChainProxy extends GenericFilterBean {
this.firewalledRequest = firewalledRequest; this.firewalledRequest = firewalledRequest;
} }
@Override
public void doFilter(ServletRequest request, ServletResponse response) public void doFilter(ServletRequest request, ServletResponse response)
throws IOException, ServletException { throws IOException, ServletException {
if (currentPosition == size) { if (currentPosition == size) {
@ -338,6 +341,7 @@ public class FilterChainProxy extends GenericFilterBean {
} }
private static class NullFilterChainValidator implements FilterChainValidator { private static class NullFilterChainValidator implements FilterChainValidator {
@Override
public void validate(FilterChainProxy filterChainProxy) { public void validate(FilterChainProxy filterChainProxy) {
} }
} }

View File

@ -40,6 +40,7 @@ public class RequestKey {
return method; return method;
} }
@Override
public int hashCode() { public int hashCode() {
int code = 31; int code = 31;
code ^= url.hashCode(); code ^= url.hashCode();
@ -51,6 +52,7 @@ public class RequestKey {
return code; return code;
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (!(obj instanceof RequestKey)) { if (!(obj instanceof RequestKey)) {
return false; return false;
@ -69,6 +71,7 @@ public class RequestKey {
return method.equals(key.method); return method.equals(key.method);
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(url.length() + 7); StringBuilder sb = new StringBuilder(url.length() + 7);
sb.append("["); sb.append("[");

View File

@ -65,6 +65,7 @@ public class DelegatingAuthenticationFailureHandler implements
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public void onAuthenticationFailure(HttpServletRequest request, public void onAuthenticationFailure(HttpServletRequest request,
HttpServletResponse response, AuthenticationException exception) HttpServletResponse response, AuthenticationException exception)
throws IOException, ServletException { throws IOException, ServletException {

View File

@ -68,6 +68,7 @@ public class WebAuthenticationDetails implements Serializable {
// ~ Methods // ~ Methods
// ======================================================================================================== // ========================================================================================================
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof WebAuthenticationDetails) { if (obj instanceof WebAuthenticationDetails) {
WebAuthenticationDetails rhs = (WebAuthenticationDetails) obj; WebAuthenticationDetails rhs = (WebAuthenticationDetails) obj;
@ -125,6 +126,7 @@ public class WebAuthenticationDetails implements Serializable {
return sessionId; return sessionId;
} }
@Override
public int hashCode() { public int hashCode() {
int code = 7654; int code = 7654;
@ -139,6 +141,7 @@ public class WebAuthenticationDetails implements Serializable {
return code; return code;
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(super.toString()).append(": "); sb.append(super.toString()).append(": ");

View File

@ -47,10 +47,12 @@ public class PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails extends
this.authorities = Collections.unmodifiableList(temp); this.authorities = Collections.unmodifiableList(temp);
} }
@Override
public List<GrantedAuthority> getGrantedAuthorities() { public List<GrantedAuthority> getGrantedAuthorities() {
return authorities; return authorities;
} }
@Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(super.toString()).append("; "); sb.append(super.toString()).append("; ");

View File

@ -98,6 +98,7 @@ public abstract class AbstractRememberMeServices implements RememberMeServices,
boolean.class); boolean.class);
} }
@Override
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
Assert.hasLength(key, "key cannot be empty or null"); Assert.hasLength(key, "key cannot be empty or null");
Assert.notNull(userDetailsService, "A UserDetailsService is required"); Assert.notNull(userDetailsService, "A UserDetailsService is required");
@ -111,6 +112,7 @@ public abstract class AbstractRememberMeServices implements RememberMeServices,
* The returned username is then used to load the UserDetails object for the user, * The returned username is then used to load the UserDetails object for the user,
* which in turn is used to create a valid authentication token. * which in turn is used to create a valid authentication token.
*/ */
@Override
public final Authentication autoLogin(HttpServletRequest request, public final Authentication autoLogin(HttpServletRequest request,
HttpServletResponse response) { HttpServletResponse response) {
String rememberMeCookie = extractRememberMeCookie(request); String rememberMeCookie = extractRememberMeCookie(request);
@ -282,6 +284,7 @@ public abstract class AbstractRememberMeServices implements RememberMeServices,
return sb.toString(); return sb.toString();
} }
@Override
public final void loginFail(HttpServletRequest request, HttpServletResponse response) { public final void loginFail(HttpServletRequest request, HttpServletResponse response) {
logger.debug("Interactive login attempt was unsuccessful."); logger.debug("Interactive login attempt was unsuccessful.");
cancelCookie(request, response); cancelCookie(request, response);
@ -300,6 +303,7 @@ public abstract class AbstractRememberMeServices implements RememberMeServices,
* true, calls <tt>onLoginSucces</tt>. * true, calls <tt>onLoginSucces</tt>.
* </p> * </p>
*/ */
@Override
public final void loginSuccess(HttpServletRequest request, public final void loginSuccess(HttpServletRequest request,
HttpServletResponse response, Authentication successfulAuthentication) { HttpServletResponse response, Authentication successfulAuthentication) {
@ -439,6 +443,7 @@ public abstract class AbstractRememberMeServices implements RememberMeServices,
* Implementation of {@code LogoutHandler}. Default behaviour is to call * Implementation of {@code LogoutHandler}. Default behaviour is to call
* {@code cancelCookie()}. * {@code cancelCookie()}.
*/ */
@Override
public void logout(HttpServletRequest request, HttpServletResponse response, public void logout(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) { Authentication authentication) {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {

View File

@ -60,14 +60,17 @@ public final class SwitchUserGrantedAuthority implements GrantedAuthority {
return source; return source;
} }
@Override
public String getAuthority() { public String getAuthority() {
return role; return role;
} }
@Override
public int hashCode() { public int hashCode() {
return 31 ^ source.hashCode() ^ role.hashCode(); return 31 ^ source.hashCode() ^ role.hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) { if (this == obj) {
return true; return true;
@ -81,6 +84,7 @@ public final class SwitchUserGrantedAuthority implements GrantedAuthority {
return false; return false;
} }
@Override
public String toString() { public String toString() {
return "Switch User Authority [" + role + "," + source + "]"; return "Switch User Authority [" + role + "," + source + "]";
} }

View File

@ -77,10 +77,12 @@ public final class Header {
return this.headerValues.equals(header.headerValues); return this.headerValues.equals(header.headerValues);
} }
@Override
public int hashCode() { public int hashCode() {
return headerName.hashCode() + headerValues.hashCode(); return headerName.hashCode() + headerValues.hashCode();
} }
@Override
public String toString() { public String toString() {
return "Header [name: " + headerName + ", values: " + headerValues + "]"; return "Header [name: " + headerName + ", values: " + headerValues + "]";
} }

View File

@ -264,6 +264,7 @@ public class DefaultSavedRequest implements SavedRequest {
return contextPath; return contextPath;
} }
@Override
public List<Cookie> getCookies() { public List<Cookie> getCookies() {
List<Cookie> cookieList = new ArrayList<Cookie>(cookies.size()); List<Cookie> cookieList = new ArrayList<Cookie>(cookies.size());
@ -279,15 +280,18 @@ public class DefaultSavedRequest implements SavedRequest {
* *
* @return the full URL of this request * @return the full URL of this request
*/ */
@Override
public String getRedirectUrl() { public String getRedirectUrl() {
return UrlUtils.buildFullRequestUrl(scheme, serverName, serverPort, requestURI, return UrlUtils.buildFullRequestUrl(scheme, serverName, serverPort, requestURI,
queryString); queryString);
} }
@Override
public Collection<String> getHeaderNames() { public Collection<String> getHeaderNames() {
return headers.keySet(); return headers.keySet();
} }
@Override
public List<String> getHeaderValues(String name) { public List<String> getHeaderValues(String name) {
List<String> values = headers.get(name); List<String> values = headers.get(name);
@ -298,14 +302,17 @@ public class DefaultSavedRequest implements SavedRequest {
return values; return values;
} }
@Override
public List<Locale> getLocales() { public List<Locale> getLocales() {
return locales; return locales;
} }
@Override
public String getMethod() { public String getMethod() {
return method; return method;
} }
@Override
public Map<String, String[]> getParameterMap() { public Map<String, String[]> getParameterMap() {
return parameters; return parameters;
} }
@ -314,6 +321,7 @@ public class DefaultSavedRequest implements SavedRequest {
return parameters.keySet(); return parameters.keySet();
} }
@Override
public String[] getParameterValues(String name) { public String[] getParameterValues(String name) {
return parameters.get(name); return parameters.get(name);
} }
@ -385,6 +393,7 @@ public class DefaultSavedRequest implements SavedRequest {
} }
} }
@Override
public String toString() { public String toString() {
return "DefaultSavedRequest[" + getRedirectUrl() + "]"; return "DefaultSavedRequest[" + getRedirectUrl() + "]";
} }