Fix checkstyle method order issues

Fix checkstyle issues with method ordering following the
spring-javaformat upgrade.

See gh-13932
This commit is contained in:
Phillip Webb
2018-07-27 15:45:33 +01:00
parent e6a68b39a3
commit 63b609827e
58 changed files with 606 additions and 606 deletions

View File

@@ -147,9 +147,8 @@ public abstract class AutoConfigurationPackages {
this.packageName = ClassUtils.getPackageName(metadata.getClassName());
}
@Override
public int hashCode() {
return this.packageName.hashCode();
public String getPackageName() {
return this.packageName;
}
@Override
@@ -160,8 +159,9 @@ public abstract class AutoConfigurationPackages {
return this.packageName.equals(((PackageImport) obj).packageName);
}
public String getPackageName() {
return this.packageName;
@Override
public int hashCode() {
return this.packageName.hashCode();
}
@Override

View File

@@ -59,16 +59,6 @@ public final class ConditionMessage {
return !StringUtils.hasLength(this.message);
}
@Override
public String toString() {
return (this.message != null) ? this.message : "";
}
@Override
public int hashCode() {
return ObjectUtils.nullSafeHashCode(this.message);
}
@Override
public boolean equals(Object obj) {
if (obj == null || !ConditionMessage.class.isInstance(obj)) {
@@ -80,6 +70,16 @@ public final class ConditionMessage {
return ObjectUtils.nullSafeEquals(((ConditionMessage) obj).message, this.message);
}
@Override
public int hashCode() {
return ObjectUtils.nullSafeHashCode(this.message);
}
@Override
public String toString() {
return (this.message != null) ? this.message : "";
}
/**
* Return a new {@link ConditionMessage} based on the instance and an appended
* message.

View File

@@ -122,12 +122,6 @@ public class ConditionOutcome {
return this.message;
}
@Override
public int hashCode() {
return Boolean.hashCode(this.match) * 31
+ ObjectUtils.nullSafeHashCode(this.message);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
@@ -144,6 +138,12 @@ public class ConditionOutcome {
return super.equals(obj);
}
@Override
public int hashCode() {
return Boolean.hashCode(this.match) * 31
+ ObjectUtils.nullSafeHashCode(this.message);
}
@Override
public String toString() {
return (this.message != null) ? this.message.toString() : "";

View File

@@ -269,20 +269,6 @@ public class EmbeddedMongoAutoConfiguration {
return this.features.contains(feature);
}
@Override
public String toString() {
return this.version;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + this.features.hashCode();
result = prime * result + this.version.hashCode();
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
@@ -301,6 +287,20 @@ public class EmbeddedMongoAutoConfiguration {
return super.equals(obj);
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + this.features.hashCode();
result = prime * result + this.version.hashCode();
return result;
}
@Override
public String toString() {
return this.version;
}
}
}