Polish ternary expressions

This commit is contained in:
Phillip Webb
2018-07-29 09:16:06 +01:00
parent b24bb688b8
commit aeb885192e
49 changed files with 59 additions and 60 deletions

View File

@@ -101,7 +101,7 @@ public class HttpTunnelConnection implements TunnelConnection {
protected final ClientHttpRequest createRequest(boolean hasPayload)
throws IOException {
HttpMethod method = (hasPayload ? HttpMethod.POST : HttpMethod.GET);
HttpMethod method = hasPayload ? HttpMethod.POST : HttpMethod.GET;
return this.requestFactory.createRequest(this.uri, method);
}

View File

@@ -161,8 +161,7 @@ public class HttpTunnelConnectionTests {
private TunnelChannel openTunnel(boolean singleThreaded) throws Exception {
HttpTunnelConnection connection = new HttpTunnelConnection(this.url,
this.requestFactory,
(singleThreaded ? new CurrentThreadExecutor() : null));
this.requestFactory, singleThreaded ? new CurrentThreadExecutor() : null);
return connection.open(this.incomingChannel, this.closeable);
}