Skip to content

Commit e9cbcba

Browse files
committed
Merge branch 'master' into h2
2 parents 83faf46 + 56d2a8a commit e9cbcba

File tree

11 files changed

+19
-61
lines changed

11 files changed

+19
-61
lines changed

build-tools/src/main/resources/software/amazon/awssdk/checkstyle-suppressions.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
<suppress checks=".*"
2828
files=".(flow)[\\/].+\.java$"/>
2929

30-
31-
3230
<!-- ignore missing annotation checks under test/codegen directory -->
3331
<suppress checks="MissingSdkAnnotationCheck"
3432
files=".(codegen|test)[\\/].+\.java$"/>
@@ -41,13 +39,10 @@
4139
<suppress checks=".*"
4240
files=".*BetterFixedChannelPool\.java$"/>
4341

42+
<!-- TODO want to contribute this back to Netty -->
4443
<suppress checks=".*"
4544
files=".*[\\/]io[\\/]netty[\\/]handler[\\/]codec[\\/]http2[\\/].*\.java$"/>
4645

47-
<!-- Kinesis has some generated code in source for H2 which fails checkstyle -->
48-
<suppress checks=".*"
49-
files=".*[\\/]software/amazon/awssdk/services/kinesis[\\/].+\.java$"/>
50-
5146
<!-- Assumes getter/setter match JSON property -->
5247
<suppress checks="AbbreviationAsWordInName"
5348
files=".*[\\/]software[\\/]amazon[\\/]awssdk[\\/]services[\\/]s3[\\/]event[\\/]S3EventNotification.java$"/>

build-tools/src/main/resources/software/amazon/awssdk/spotbugs-suppressions.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@
6161
<Bug pattern="URF_UNREAD_FIELD,DLS_DEAD_LOCAL_STORE,REC_CATCH_EXCEPTION" />
6262
</Match>
6363

64-
<!-- NP_NONNULL_PARAM_VIOLATION false postive - https://github.com/spotbugs/spotbugs/issues/484 -->
65-
<Match>
66-
<Class name="software.amazon.awssdk.core.async.internal.SequentialSubscriber" />
67-
<Method name="onComplete" />
68-
<Bug pattern="NP_NONNULL_PARAM_VIOLATION" />
69-
</Match>
70-
7164
<!-- False positive -->
7265
<Match>
7366
<Class name="software.amazon.awssdk.core.ResponseBytes" />

codegen/src/main/java/software/amazon/awssdk/codegen/poet/client/AsyncClientClass.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ public TypeSpec poetSpec() {
8888
if (model.hasPaginators()) {
8989
classBuilder.addMethod(applyPaginatorUserAgentMethod(poetExtensions, model));
9090
}
91-
9291
protocolSpec.createErrorResponseHandler().ifPresent(classBuilder::addMethod);
9392

9493
return classBuilder.build();

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/paginators/PaginatedOperationWithResultKeyPublisher.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ public class PaginatedOperationWithResultKeyPublisher implements SdkPublisher<Pa
8181
private boolean isLastPage;
8282

8383
public PaginatedOperationWithResultKeyPublisher(JsonProtocolTestsAsyncClient client,
84-
PaginatedOperationWithResultKeyRequest firstRequest) {
84+
PaginatedOperationWithResultKeyRequest firstRequest) {
8585
this(client, firstRequest, false);
8686
}
8787

8888
private PaginatedOperationWithResultKeyPublisher(JsonProtocolTestsAsyncClient client,
89-
PaginatedOperationWithResultKeyRequest firstRequest, boolean isLastPage) {
89+
PaginatedOperationWithResultKeyRequest firstRequest, boolean isLastPage) {
9090
this.client = client;
9191
this.firstRequest = firstRequest;
9292
this.isLastPage = isLastPage;
@@ -111,7 +111,7 @@ public final SdkPublisher<SimpleStruct> items() {
111111
return Collections.emptyIterator();
112112
};
113113
return PaginatedItemsPublisher.builder().nextPageFetcher(new PaginatedOperationWithResultKeyResponseFetcher())
114-
.iteratorFunction(getIterator).isLastPage(isLastPage).build();
114+
.iteratorFunction(getIterator).isLastPage(isLastPage).build();
115115
}
116116

117117
/**
@@ -124,7 +124,7 @@ public final SdkPublisher<SimpleStruct> items() {
124124
private final PaginatedOperationWithResultKeyPublisher resume(PaginatedOperationWithResultKeyResponse lastSuccessfulPage) {
125125
if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) {
126126
return new PaginatedOperationWithResultKeyPublisher(client, firstRequest.toBuilder()
127-
.nextToken(lastSuccessfulPage.nextToken()).build());
127+
.nextToken(lastSuccessfulPage.nextToken()).build());
128128
}
129129
return new PaginatedOperationWithResultKeyPublisher(client, firstRequest, true) {
130130
@Override
@@ -135,16 +135,16 @@ public void subscribe(Subscriber<? super PaginatedOperationWithResultKeyResponse
135135
}
136136

137137
private class PaginatedOperationWithResultKeyResponseFetcher implements
138-
AsyncPageFetcher<PaginatedOperationWithResultKeyResponse> {
138+
AsyncPageFetcher<PaginatedOperationWithResultKeyResponse> {
139139
@Override
140140
public boolean hasNextPage(final PaginatedOperationWithResultKeyResponse previousPage) {
141141
return previousPage.nextToken() != null && !SdkAutoConstructList.class.isInstance(previousPage.nextToken())
142-
&& !SdkAutoConstructMap.class.isInstance(previousPage.nextToken());
142+
&& !SdkAutoConstructMap.class.isInstance(previousPage.nextToken());
143143
}
144144

145145
@Override
146146
public CompletableFuture<PaginatedOperationWithResultKeyResponse> nextPage(
147-
final PaginatedOperationWithResultKeyResponse previousPage) {
147+
final PaginatedOperationWithResultKeyResponse previousPage) {
148148
if (previousPage == null) {
149149
return client.paginatedOperationWithResultKey(firstRequest);
150150
}

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/paginators/PaginatedOperationWithoutResultKeyPublisher.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ public class PaginatedOperationWithoutResultKeyPublisher implements SdkPublisher
7676
private boolean isLastPage;
7777

7878
public PaginatedOperationWithoutResultKeyPublisher(JsonProtocolTestsAsyncClient client,
79-
PaginatedOperationWithoutResultKeyRequest firstRequest) {
79+
PaginatedOperationWithoutResultKeyRequest firstRequest) {
8080
this(client, firstRequest, false);
8181
}
8282

8383
private PaginatedOperationWithoutResultKeyPublisher(JsonProtocolTestsAsyncClient client,
84-
PaginatedOperationWithoutResultKeyRequest firstRequest, boolean isLastPage) {
84+
PaginatedOperationWithoutResultKeyRequest firstRequest, boolean isLastPage) {
8585
this.client = client;
8686
this.firstRequest = firstRequest;
8787
this.isLastPage = isLastPage;
@@ -103,7 +103,7 @@ public void subscribe(Subscriber<? super PaginatedOperationWithoutResultKeyRespo
103103
private final PaginatedOperationWithoutResultKeyPublisher resume(PaginatedOperationWithoutResultKeyResponse lastSuccessfulPage) {
104104
if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) {
105105
return new PaginatedOperationWithoutResultKeyPublisher(client, firstRequest.toBuilder()
106-
.nextToken(lastSuccessfulPage.nextToken()).build());
106+
.nextToken(lastSuccessfulPage.nextToken()).build());
107107
}
108108
return new PaginatedOperationWithoutResultKeyPublisher(client, firstRequest, true) {
109109
@Override
@@ -114,21 +114,21 @@ public void subscribe(Subscriber<? super PaginatedOperationWithoutResultKeyRespo
114114
}
115115

116116
private class PaginatedOperationWithoutResultKeyResponseFetcher implements
117-
AsyncPageFetcher<PaginatedOperationWithoutResultKeyResponse> {
117+
AsyncPageFetcher<PaginatedOperationWithoutResultKeyResponse> {
118118
@Override
119119
public boolean hasNextPage(final PaginatedOperationWithoutResultKeyResponse previousPage) {
120120
return previousPage.nextToken() != null && !SdkAutoConstructList.class.isInstance(previousPage.nextToken())
121-
&& !SdkAutoConstructMap.class.isInstance(previousPage.nextToken());
121+
&& !SdkAutoConstructMap.class.isInstance(previousPage.nextToken());
122122
}
123123

124124
@Override
125125
public CompletableFuture<PaginatedOperationWithoutResultKeyResponse> nextPage(
126-
final PaginatedOperationWithoutResultKeyResponse previousPage) {
126+
final PaginatedOperationWithoutResultKeyResponse previousPage) {
127127
if (previousPage == null) {
128128
return client.paginatedOperationWithoutResultKey(firstRequest);
129129
}
130130
return client
131-
.paginatedOperationWithoutResultKey(firstRequest.toBuilder().nextToken(previousPage.nextToken()).build());
131+
.paginatedOperationWithoutResultKey(firstRequest.toBuilder().nextToken(previousPage.nextToken()).build());
132132
}
133133
}
134134
}

core/sdk-core/build.properties

Lines changed: 0 additions & 25 deletions
This file was deleted.

core/sdk-core/src/main/java/software/amazon/awssdk/core/protocol/json/SdkJsonProtocolFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ protected StructuredJsonGenerator createGenerator(OperationInfo operationInfo) {
5252
}
5353
}
5454

55-
private StructuredJsonGenerator createGenerator() {
55+
@SdkTestInternalApi
56+
StructuredJsonGenerator createGenerator() {
5657
return JSON_FACTORY.createWriter(CONTENT_TYPE);
5758
}
5859

services/kinesis/src/main/resources/codegen-resources/customization.config

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"protocol": "cbor"
77
},
88
"skipSmokeTests": "true",
9-
"skipSyncClientGeneration": true,
109
"blacklistedSimpleMethods": ["deregisterStreamConsumer", "describeStreamConsumer", "listShards"],
11-
"customRetryPolicy" : "software.amazon.awssdk.services.kinesis.KinesisRetryPolicy"
10+
"customRetryPolicy" : "software.amazon.awssdk.services.kinesis.KinesisRetryPolicy"
1211
}

services/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
<module>iot</module>
8989
<module>iotdata</module>
9090
<module>kinesis</module>
91-
<!-- <module>kinesis-bundle</module> -->
9291
<module>kinesisanalytics</module>
9392
<module>kinesisfirehose</module>
9493
<module>kms</module>

test/protocol-tests/src/test/java/software/amazon/awssdk/protocol/tests/ExecutionInterceptorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
import software.amazon.awssdk.core.SdkResponse;
5555
import software.amazon.awssdk.core.async.AsyncRequestBody;
5656
import software.amazon.awssdk.core.async.AsyncResponseTransformer;
57+
import software.amazon.awssdk.core.async.SdkPublisher;
5758
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
5859
import software.amazon.awssdk.core.exception.SdkServiceException;
5960
import software.amazon.awssdk.core.interceptor.Context;
6061
import software.amazon.awssdk.core.interceptor.ExecutionAttributes;
6162
import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
62-
import software.amazon.awssdk.core.async.SdkPublisher;
6363
import software.amazon.awssdk.core.sync.RequestBody;
6464
import software.amazon.awssdk.http.SdkHttpFullRequest;
6565
import software.amazon.awssdk.http.SdkHttpFullResponse;

utils/src/main/java/software/amazon/awssdk/utils/async/SequentialSubscriber.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ public void onError(Throwable t) {
5858

5959
@Override
6060
public void onComplete() {
61-
// TODO Update spotbugs version when new version is released and remove this filter the spotbugs-suppressions.xml file
62-
// SpotBugs incorrectly reports NP_NONNULL_PARAM_VIOLATION when passing null. The fix is not released yet
63-
// https://github.com/spotbugs/spotbugs/issues/484
6461
future.complete(null);
6562
}
6663
}

0 commit comments

Comments
 (0)