Skip to content

Commit b4e0a10

Browse files
More checkstyle fixes.
1 parent 920f733 commit b4e0a10

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

http-clients/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/AwsCrtAsyncHttpClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ AwsCrtAsyncHttpClient.Builder tcpKeepAliveConfiguration(Consumer<TcpKeepAliveCon
235235
* Factory that allows more advanced configuration of the AWS CRT HTTP implementation. Use {@link #builder()} to
236236
* configure and construct an immutable instance of the factory.
237237
*/
238-
private static final class DefaultAsyncBuilder extends AwsCrtClientBuilderBase<AwsCrtAsyncHttpClient.Builder> implements Builder {
238+
private static final class DefaultAsyncBuilder
239+
extends AwsCrtClientBuilderBase<AwsCrtAsyncHttpClient.Builder> implements Builder {
239240

240241
@Override
241242
public SdkAsyncHttpClient build() {

http-clients/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/AwsCrtHttpClient.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.util.concurrent.CompletableFuture;
2323
import java.util.concurrent.ExecutionException;
2424
import java.util.function.Consumer;
25+
import software.amazon.awssdk.annotations.SdkPublicApi;
2526
import software.amazon.awssdk.crt.http.HttpClientConnectionManager;
2627
import software.amazon.awssdk.crt.http.HttpException;
2728
import software.amazon.awssdk.http.ExecutableHttpRequest;
@@ -32,8 +33,8 @@
3233
import software.amazon.awssdk.http.SdkHttpFullResponse;
3334
import software.amazon.awssdk.http.crt.internal.AwsCrtClientBuilderBase;
3435
import software.amazon.awssdk.http.crt.internal.AwsCrtHttpClientBase;
35-
import software.amazon.awssdk.http.crt.internal.CrtRequestExecutor;
3636
import software.amazon.awssdk.http.crt.internal.CrtRequestContext;
37+
import software.amazon.awssdk.http.crt.internal.CrtRequestExecutor;
3738
import software.amazon.awssdk.metrics.NoOpMetricCollector;
3839
import software.amazon.awssdk.utils.AttributeMap;
3940

@@ -51,6 +52,7 @@
5152
*}
5253
*
5354
*/
55+
@SdkPublicApi
5456
public final class AwsCrtHttpClient extends AwsCrtHttpClientBase implements SdkHttpClient {
5557

5658
private AwsCrtHttpClient(DefaultBuilder builder, AttributeMap config) {
@@ -260,10 +262,11 @@ AwsCrtHttpClient.Builder tcpKeepAliveConfiguration(Consumer<TcpKeepAliveConfigur
260262
}
261263

262264
/**
263-
* Factory that allows more advanced configuration of the AWS CRT HTTP implementation. Use {@link #builder()} to
264-
* configure and construct an immutable instance of the factory.
265+
* Factory that allows more advanced configuration of the AWS CRT HTTP implementation.
266+
* Use {@link #builder()} to configure and construct an immutable instance of the factory.
265267
*/
266-
private static final class DefaultBuilder extends AwsCrtClientBuilderBase<AwsCrtHttpClient.Builder> implements AwsCrtHttpClient.Builder {
268+
private static final class DefaultBuilder
269+
extends AwsCrtClientBuilderBase<AwsCrtHttpClient.Builder> implements AwsCrtHttpClient.Builder {
267270

268271

269272
@Override

http-clients/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/internal/AwsCrtHttpClientBase.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public abstract class AwsCrtHttpClientBase implements SdkAutoCloseable {
5454
private static final String AWS_COMMON_RUNTIME = "AwsCommonRuntime";
5555
private static final long DEFAULT_STREAM_WINDOW_SIZE = 16L * 1024L * 1024L; // 16 MB
5656

57+
protected final long readBufferSize;
5758
private final Map<URI, HttpClientConnectionManager> connectionPools = new ConcurrentHashMap<>();
5859
private final LinkedList<CrtResource> ownedSubResources = new LinkedList<>();
5960
private final ClientBootstrap bootstrap;
@@ -62,7 +63,6 @@ public abstract class AwsCrtHttpClientBase implements SdkAutoCloseable {
6263
private final HttpProxyOptions proxyOptions;
6364
private final HttpMonitoringOptions monitoringOptions;
6465
private final long maxConnectionIdleInMilliseconds;
65-
protected final long readBufferSize;
6666
private final int maxConnectionsPerEndpoint;
6767
private boolean isClosed = false;
6868

@@ -84,7 +84,8 @@ protected AwsCrtHttpClientBase(AwsCrtClientBuilderBase builder, AttributeMap con
8484
this.bootstrap = registerOwnedResource(clientBootstrap);
8585
this.socketOptions = registerOwnedResource(clientSocketOptions);
8686
this.tlsContext = registerOwnedResource(clientTlsContext);
87-
this.readBufferSize = builder.getReadBufferSizeInBytes() == null ? DEFAULT_STREAM_WINDOW_SIZE : builder.getReadBufferSizeInBytes();
87+
this.readBufferSize = builder.getReadBufferSizeInBytes() == null ?
88+
DEFAULT_STREAM_WINDOW_SIZE : builder.getReadBufferSizeInBytes();
8889
this.maxConnectionsPerEndpoint = config.get(SdkHttpConfigurationOption.MAX_CONNECTIONS);
8990
this.monitoringOptions = resolveHttpMonitoringOptions(builder.getConnectionHealthConfiguration()).orElse(null);
9091
this.maxConnectionIdleInMilliseconds = config.get(SdkHttpConfigurationOption.CONNECTION_MAX_IDLE_TIMEOUT).toMillis();

http-clients/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/internal/CrtRequestExecutor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@
5454

5555
@SdkInternalApi
5656
public final class CrtRequestExecutor {
57-
private static final Logger log = Logger.loggerFor(CrtRequestExecutor.class);
5857
public static final int CRT_TLS_NEGOTIATION_ERROR_CODE = 1029;
5958

59+
private static final Logger log = Logger.loggerFor(CrtRequestExecutor.class);
60+
6061
public CompletableFuture<SdkHttpFullResponse> execute(CrtRequestContext executionContext) {
6162
// go ahead and get a reference to the metricCollector since multiple futures will
6263
// need it regardless.

http-clients/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/internal/request/CrtRequestInputStreamAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626

2727
@SdkInternalApi
2828
final class CrtRequestInputStreamAdapter implements HttpRequestBodyStream {
29+
private static final int READ_BUFFER_SIZE = 16 * 1024;
30+
2931
private final ContentStreamProvider provider;
3032
private InputStream providerStream;
3133
private final byte[] readBuffer = new byte[READ_BUFFER_SIZE];
3234

33-
private static final int READ_BUFFER_SIZE = 16 * 1024;
34-
3535
CrtRequestInputStreamAdapter(ContentStreamProvider provider) {
3636
this.provider = provider;
3737
}

0 commit comments

Comments
 (0)