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

@@ -119,13 +119,13 @@ public class TypeExcludeFiltersContextCustomizerFactoryTests {
}
@Override
public int hashCode() {
return SimpleExclude.class.hashCode();
public boolean equals(Object obj) {
return obj.getClass() == getClass();
}
@Override
public boolean equals(Object obj) {
return obj.getClass() == getClass();
public int hashCode() {
return SimpleExclude.class.hashCode();
}
}

View File

@@ -33,11 +33,6 @@ public class ExampleBasicObject {
this.value = value;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj != null && obj.getClass() == getClass()) {
@@ -46,4 +41,9 @@ public class ExampleBasicObject {
return false;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
}

View File

@@ -29,11 +29,6 @@ public class ExampleCustomObject {
this.value = value;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj != null && obj.getClass() == getClass()) {
@@ -42,6 +37,11 @@ public class ExampleCustomObject {
return false;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
@Override
public String toString() {
return this.value;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,11 +48,6 @@ public class ExampleJsonObjectWithView {
this.id = id;
}
@Override
public int hashCode() {
return 0;
}
@Override
public boolean equals(Object obj) {
if (obj == null || obj.getClass() != getClass()) {
@@ -63,6 +58,11 @@ public class ExampleJsonObjectWithView {
&& ObjectUtils.nullSafeEquals(this.id, other.id);
}
@Override
public int hashCode() {
return 0;
}
@Override
public String toString() {
return this.value + " " + this.id;