Browse Source

Fix ResolvableType hashCode generation

Fix ResolvableType.hashCode() to use the source of the variable
resolver, rather than the resolver itself.
pull/423/head
Phillip Webb 11 years ago
parent
commit
ab2949f2b7
  1. 3
      spring-core/src/main/java/org/springframework/core/ResolvableType.java

3
spring-core/src/main/java/org/springframework/core/ResolvableType.java

@ -690,7 +690,8 @@ public final class ResolvableType implements Serializable { @@ -690,7 +690,8 @@ public final class ResolvableType implements Serializable {
@Override
public int hashCode() {
int hashCode = ObjectUtils.nullSafeHashCode(this.type);
hashCode = hashCode * 31 + ObjectUtils.nullSafeHashCode(this.variableResolver);
hashCode = hashCode * 31 + ObjectUtils.nullSafeHashCode(
this.variableResolver == null ? null : this.variableResolver.getSource());
hashCode = hashCode * 31 + ObjectUtils.nullSafeHashCode(this.componentType);
return hashCode;
}

Loading…
Cancel
Save