Upgrade to spring-javaformat 0.0.6
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<properties>
|
||||
<main.basedir>${basedir}/..</main.basedir>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-javaformat.version>0.0.2</spring-javaformat.version>
|
||||
<spring-javaformat.version>0.0.6</spring-javaformat.version>
|
||||
<disable.checks>false</disable.checks>
|
||||
</properties>
|
||||
<modules>
|
||||
|
||||
@@ -25,7 +25,7 @@ public interface HotelSummary {
|
||||
Double getAverageRating();
|
||||
|
||||
default Integer getAverageRatingRounded() {
|
||||
return (getAverageRating() != null ? (int) Math.round(getAverageRating()) : null);
|
||||
return (getAverageRating() != null) ? (int) Math.round(getAverageRating()) : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class HotelServiceImpl implements HotelService {
|
||||
@Override
|
||||
public long getNumberOfReviewsWithRating(Rating rating) {
|
||||
Long count = this.ratingCount.get(rating);
|
||||
return (count != null ? count : 0);
|
||||
return (count != null) ? count : 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public interface HotelSummary {
|
||||
Double getAverageRating();
|
||||
|
||||
default Integer getAverageRatingRounded() {
|
||||
return (getAverageRating() != null ? (int) Math.round(getAverageRating()) : null);
|
||||
return (getAverageRating() != null) ? (int) Math.round(getAverageRating()) : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class HotelServiceImpl implements HotelService {
|
||||
@Override
|
||||
public long getNumberOfReviewsWithRating(Rating rating) {
|
||||
Long count = this.ratingCount.get(rating);
|
||||
return (count != null ? count : 0);
|
||||
return (count != null) ? count : 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public interface HotelSummary {
|
||||
Double getAverageRating();
|
||||
|
||||
default Integer getAverageRatingRounded() {
|
||||
return (getAverageRating() != null ? (int) Math.round(getAverageRating()) : null);
|
||||
return (getAverageRating() != null) ? (int) Math.round(getAverageRating()) : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class HotelServiceImpl implements HotelService {
|
||||
@Override
|
||||
public long getNumberOfReviewsWithRating(Rating rating) {
|
||||
Long count = this.ratingCount.get(rating);
|
||||
return (count != null ? count : 0);
|
||||
return (count != null) ? count : 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 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.
|
||||
@@ -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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 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.
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class DefaultEchoService implements EchoService {
|
||||
private final String echoFormat;
|
||||
|
||||
public DefaultEchoService(String echoFormat) {
|
||||
this.echoFormat = (echoFormat != null ? echoFormat : "%s");
|
||||
this.echoFormat = (echoFormat != null) ? echoFormat : "%s";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,7 +21,7 @@ public class DefaultEchoService implements EchoService {
|
||||
private final String echoFormat;
|
||||
|
||||
public DefaultEchoService(String echoFormat) {
|
||||
this.echoFormat = (echoFormat != null ? echoFormat : "%s");
|
||||
this.echoFormat = (echoFormat != null) ? echoFormat : "%s";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,7 +21,7 @@ public class DefaultEchoService implements EchoService {
|
||||
private final String echoFormat;
|
||||
|
||||
public DefaultEchoService(String echoFormat) {
|
||||
this.echoFormat = (echoFormat != null ? echoFormat : "%s");
|
||||
this.echoFormat = (echoFormat != null) ? echoFormat : "%s";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,7 +21,7 @@ public class DefaultEchoService implements EchoService {
|
||||
private final String echoFormat;
|
||||
|
||||
public DefaultEchoService(String echoFormat) {
|
||||
this.echoFormat = (echoFormat != null ? echoFormat : "%s");
|
||||
this.echoFormat = (echoFormat != null) ? echoFormat : "%s";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user