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

@@ -68,13 +68,6 @@ public class ItemDeprecation {
this.level = level;
}
@Override
public String toString() {
return "ItemDeprecation{" + "reason='" + this.reason + '\'' + ", "
+ "replacement='" + this.replacement + '\'' + ", " + "level='"
+ this.level + '\'' + '}';
}
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -97,6 +90,13 @@ public class ItemDeprecation {
return result;
}
@Override
public String toString() {
return "ItemDeprecation{" + "reason='" + this.reason + '\'' + ", "
+ "replacement='" + this.replacement + '\'' + ", " + "level='"
+ this.level + '\'' + '}';
}
private boolean nullSafeEquals(Object o1, Object o2) {
if (o1 == o2) {
return true;

View File

@@ -133,24 +133,6 @@ public final class ItemMetadata implements Comparable<ItemMetadata> {
this.deprecation = deprecation;
}
@Override
public String toString() {
StringBuilder string = new StringBuilder(this.name);
buildToStringProperty(string, "type", this.type);
buildToStringProperty(string, "sourceType", this.sourceType);
buildToStringProperty(string, "description", this.description);
buildToStringProperty(string, "defaultValue", this.defaultValue);
buildToStringProperty(string, "deprecation", this.deprecation);
return string.toString();
}
protected void buildToStringProperty(StringBuilder string, String property,
Object value) {
if (value != null) {
string.append(" ").append(property).append(":").append(value);
}
}
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -199,6 +181,24 @@ public final class ItemMetadata implements Comparable<ItemMetadata> {
return (o != null) ? o.hashCode() : 0;
}
@Override
public String toString() {
StringBuilder string = new StringBuilder(this.name);
buildToStringProperty(string, "type", this.type);
buildToStringProperty(string, "sourceType", this.sourceType);
buildToStringProperty(string, "description", this.description);
buildToStringProperty(string, "defaultValue", this.defaultValue);
buildToStringProperty(string, "deprecation", this.deprecation);
return string.toString();
}
protected void buildToStringProperty(StringBuilder string, String property,
Object value) {
if (value != null) {
string.append(" ").append(property).append(":").append(value);
}
}
@Override
public int compareTo(ItemMetadata o) {
return getName().compareTo(o.getName());