Fix checkstyle issues on master

Fix checkstyle issues following 2.0.x merge and
spring-javaformat upgrade.

See gh-13932
This commit is contained in:
Phillip Webb
2018-07-27 23:58:57 +01:00
parent a6c9c92f2e
commit ce9c053cbf
11 changed files with 19 additions and 19 deletions

View File

@@ -147,7 +147,7 @@ public class CachesEndpoint {
}
private Predicate<String> isNameMatch(String name) {
return (name != null ? ((requested) -> requested.equals(name)) : matchAll());
return (name != null) ? ((requested) -> requested.equals(name)) : matchAll();
}
private Predicate<String> matchAll() {

View File

@@ -44,8 +44,8 @@ public class CachesEndpointWebExtension {
@Nullable String cacheManager) {
try {
CacheEntry entry = this.delegate.cache(cache, cacheManager);
int status = (entry != null ? WebEndpointResponse.STATUS_OK
: WebEndpointResponse.STATUS_NOT_FOUND);
int status = (entry != null) ? WebEndpointResponse.STATUS_OK
: WebEndpointResponse.STATUS_NOT_FOUND;
return new WebEndpointResponse<>(entry, status);
}
catch (NonUniqueCacheException ex) {

View File

@@ -60,7 +60,7 @@ public class HealthEndpoint {
public Health healthForComponent(@Selector String component) {
HealthIndicator indicator = getNestedHealthIndicator(this.healthIndicator,
component);
return (indicator != null ? indicator.health() : null);
return (indicator != null) ? indicator.health() : null;
}
/**
@@ -77,7 +77,7 @@ public class HealthEndpoint {
HealthIndicator indicator = getNestedHealthIndicator(this.healthIndicator,
component);
HealthIndicator nestedIndicator = getNestedHealthIndicator(indicator, instance);
return (nestedIndicator != null ? nestedIndicator.health() : null);
return (nestedIndicator != null) ? nestedIndicator.health() : null;
}
private HealthIndicator getNestedHealthIndicator(HealthIndicator healthIndicator,

View File

@@ -93,7 +93,7 @@ public final class WebClientExchangeTags {
* @return the status tag
*/
public static Tag status(Throwable throwable) {
return (throwable instanceof IOException ? IO_ERROR : CLIENT_ERROR);
return (throwable instanceof IOException) ? IO_ERROR : CLIENT_ERROR;
}
/**