Polish ternary expressions
Consistently format ternary expressions and always favor `!=` as the the check.
This commit is contained in:
@@ -56,7 +56,7 @@ public class ClassLoaderFile implements Serializable {
|
||||
public ClassLoaderFile(Kind kind, long lastModified, byte[] contents) {
|
||||
Assert.notNull(kind, "Kind must not be null");
|
||||
Assert.isTrue(kind != Kind.DELETED ? contents != null : contents == null,
|
||||
() -> "Contents must " + (kind == Kind.DELETED ? "" : "not ")
|
||||
() -> "Contents must " + (kind != Kind.DELETED ? "not " : "")
|
||||
+ "be null");
|
||||
this.kind = kind;
|
||||
this.lastModified = lastModified;
|
||||
|
||||
@@ -119,7 +119,7 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
|
||||
|
||||
public ClientHttpResponse asHttpResponse(AtomicLong seq) {
|
||||
MockClientHttpResponse httpResponse = new MockClientHttpResponse(
|
||||
this.payload == null ? NO_DATA : this.payload, this.status);
|
||||
this.payload != null ? this.payload : NO_DATA, this.status);
|
||||
waitForDelay();
|
||||
if (this.payload != null) {
|
||||
httpResponse.getHeaders().setContentLength(this.payload.length);
|
||||
|
||||
Reference in New Issue
Block a user