Fix checkstyle issues in samples

Fix checkstyle issues with samples following the
spring-javaformat upgrade.

See gh-13932
This commit is contained in:
Phillip Webb
2018-07-28 10:41:56 +01:00
parent 63b609827e
commit 9ca9a491ca
7 changed files with 15 additions and 15 deletions

View File

@@ -33,11 +33,6 @@ public final class VehicleIdentificationNumber {
this.vin = vin;
}
@Override
public int hashCode() {
return this.vin.hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
@@ -49,6 +44,11 @@ public final class VehicleIdentificationNumber {
return this.vin.equals(((VehicleIdentificationNumber) obj).vin);
}
@Override
public int hashCode() {
return this.vin.hashCode();
}
@Override
public String toString() {
return this.vin;

View File

@@ -49,11 +49,6 @@ public class VehicleDetails {
return this.model;
}
@Override
public int hashCode() {
return this.make.hashCode() * 31 + this.model.hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
@@ -66,4 +61,9 @@ public class VehicleDetails {
return this.make.equals(other.make) && this.model.equals(other.model);
}
@Override
public int hashCode() {
return this.make.hashCode() * 31 + this.model.hashCode();
}
}