Fix checkstyle ternary issues

Fix checkstyle issues with ternary expressions following the
spring-javaformat upgrade.

See gh-13932
This commit is contained in:
Phillip Webb
2018-07-27 22:54:20 +01:00
parent ec1100a896
commit 7fc455654a
293 changed files with 714 additions and 685 deletions

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.
@@ -139,7 +139,7 @@ public class ClassPathChangeUploaderTests {
private void assertClassFile(ClassLoaderFile file, String content, Kind kind) {
assertThat(file.getContents())
.isEqualTo(content != null ? content.getBytes() : null);
.isEqualTo((content != null) ? content.getBytes() : null);
assertThat(file.getKind()).isEqualTo(kind);
}

View File

@@ -119,7 +119,7 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
public ClientHttpResponse asHttpResponse(AtomicLong seq) {
MockClientHttpResponse httpResponse = new MockClientHttpResponse(
this.payload != null ? this.payload : NO_DATA, this.status);
(this.payload != null) ? this.payload : NO_DATA, this.status);
waitForDelay();
if (this.payload != null) {
httpResponse.getHeaders().setContentLength(this.payload.length);