Skip to content

Fix Javadocs on async paginators #880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-AWSSDKforJavav2-135b2d9.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"category": "AWS SDK for Java v2",
"type": "bugfix",
"description": "Fix async pagination javadocs to use the correct method name `SdkPublisher#subscribe`."
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ private String getAsyncCodeSnippets() {

return CodeBlock.builder()
.add("\n\n<p>The following are few ways to use the response class:</p>")
.add("1) Using the forEach helper method",
.add("1) Using the subscribe helper method",
TypeName.get(SequentialSubscriber.class))
.add(buildCode(CodeBlock.builder()
.add(callOperationOnClient)
.add(CodeBlock.builder()
.addStatement("CompletableFuture<Void> future = publisher"
+ ".forEach(res -> "
+ ".subscribe(res -> "
+ "{ // Do something with the response })")
.addStatement("future.get()")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,12 @@ public CompletableFuture<PaginatedOperationWithResultKeyResponse> paginatedOpera
* <p>
* The following are few ways to use the response class:
* </p>
* 1) Using the forEach helper method
* 1) Using the subscribe helper method
*
* <pre>
* {@code
* software.amazon.awssdk.services.json.paginators.PaginatedOperationWithResultKeyPublisher publisher = client.paginatedOperationWithResultKeyPaginator(request);
* CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
* CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
* </pre>
Expand Down Expand Up @@ -567,12 +567,12 @@ public CompletableFuture<PaginatedOperationWithoutResultKeyResponse> paginatedOp
* <p>
* The following are few ways to use the response class:
* </p>
* 1) Using the forEach helper method
* 1) Using the subscribe helper method
*
* <pre>
* {@code
* software.amazon.awssdk.services.json.paginators.PaginatedOperationWithoutResultKeyPublisher publisher = client.paginatedOperationWithoutResultKeyPaginator(request);
* CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
* CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
* </pre>
Expand Down Expand Up @@ -824,4 +824,3 @@ private HttpResponseHandler<AwsServiceException> createErrorResponseHandler(Base
return protocolFactory.createErrorResponseHandler(operationMetadata);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -490,12 +490,12 @@ default CompletableFuture<PaginatedOperationWithResultKeyResponse> paginatedOper
* <p>
* The following are few ways to use the response class:
* </p>
* 1) Using the forEach helper method
* 1) Using the subscribe helper method
*
* <pre>
* {@code
* software.amazon.awssdk.services.json.paginators.PaginatedOperationWithResultKeyPublisher publisher = client.paginatedOperationWithResultKeyPaginator(request);
* CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
* CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
* </pre>
Expand Down Expand Up @@ -561,12 +561,12 @@ default PaginatedOperationWithResultKeyPublisher paginatedOperationWithResultKey
* <p>
* The following are few ways to use the response class:
* </p>
* 1) Using the forEach helper method
* 1) Using the subscribe helper method
*
* <pre>
* {@code
* software.amazon.awssdk.services.json.paginators.PaginatedOperationWithResultKeyPublisher publisher = client.paginatedOperationWithResultKeyPaginator(request);
* CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
* CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
* </pre>
Expand Down Expand Up @@ -634,12 +634,12 @@ default PaginatedOperationWithResultKeyPublisher paginatedOperationWithResultKey
* <p>
* The following are few ways to use the response class:
* </p>
* 1) Using the forEach helper method
* 1) Using the subscribe helper method
*
* <pre>
* {@code
* software.amazon.awssdk.services.json.paginators.PaginatedOperationWithResultKeyPublisher publisher = client.paginatedOperationWithResultKeyPaginator(request);
* CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
* CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
* </pre>
Expand Down Expand Up @@ -771,12 +771,12 @@ default CompletableFuture<PaginatedOperationWithoutResultKeyResponse> paginatedO
* <p>
* The following are few ways to use the response class:
* </p>
* 1) Using the forEach helper method
* 1) Using the subscribe helper method
*
* <pre>
* {@code
* software.amazon.awssdk.services.json.paginators.PaginatedOperationWithoutResultKeyPublisher publisher = client.paginatedOperationWithoutResultKeyPaginator(request);
* CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
* CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
* </pre>
Expand Down Expand Up @@ -844,12 +844,12 @@ default PaginatedOperationWithoutResultKeyPublisher paginatedOperationWithoutRes
* <p>
* The following are few ways to use the response class:
* </p>
* 1) Using the forEach helper method
* 1) Using the subscribe helper method
*
* <pre>
* {@code
* software.amazon.awssdk.services.json.paginators.PaginatedOperationWithoutResultKeyPublisher publisher = client.paginatedOperationWithoutResultKeyPaginator(request);
* CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
* CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
* </pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
* <p>
* The following are few ways to use the response class:
* </p>
* 1) Using the forEach helper method
* 1) Using the subscribe helper method
*
* <pre>
* {@code
* software.amazon.awssdk.services.jsonprotocoltests.paginators.PaginatedOperationWithResultKeyPublisher publisher = client.paginatedOperationWithResultKeyPaginator(request);
* CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
* CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
* </pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
* <p>
* The following are few ways to use the response class:
* </p>
* 1) Using the forEach helper method
* 1) Using the subscribe helper method
*
* <pre>
* {@code
* software.amazon.awssdk.services.jsonprotocoltests.paginators.PaginatedOperationWithoutResultKeyPublisher publisher = client.paginatedOperationWithoutResultKeyPaginator(request);
* CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
* CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
* </pre>
Expand Down