Polishing

This commit is contained in:
Juergen Hoeller
2018-06-28 17:12:29 +02:00
parent 6f8a524eaa
commit 8ad5299f4a
7 changed files with 22 additions and 46 deletions

View File

@@ -157,10 +157,7 @@ public abstract class MethodMatchers {
@Override
public int hashCode() {
int hashCode = 17;
hashCode = 37 * hashCode + this.mm1.hashCode();
hashCode = 37 * hashCode + this.mm2.hashCode();
return hashCode;
return 37 * this.mm1.hashCode() + this.mm2.hashCode();
}
}
@@ -192,14 +189,6 @@ public abstract class MethodMatchers {
return (targetClass != null && this.cf2.matches(targetClass));
}
@Override
public int hashCode() {
int hashCode = 17;
hashCode = 37 * hashCode + this.cf1.hashCode();
hashCode = 37 * hashCode + this.cf2.hashCode();
return hashCode;
}
@Override
public boolean equals(Object other) {
if (this == other) {
@@ -217,6 +206,14 @@ public abstract class MethodMatchers {
}
return (this.cf1.equals(otherCf1) && this.cf2.equals(otherCf2));
}
@Override
public int hashCode() {
int hashCode = super.hashCode();
hashCode = 37 * hashCode + this.cf1.hashCode();
hashCode = 37 * hashCode + this.cf2.hashCode();
return hashCode;
}
}
@@ -279,10 +276,7 @@ public abstract class MethodMatchers {
@Override
public int hashCode() {
int hashCode = 17;
hashCode = 37 * hashCode + this.mm1.hashCode();
hashCode = 37 * hashCode + this.mm2.hashCode();
return hashCode;
return 37 * this.mm1.hashCode() + this.mm2.hashCode();
}
}