Skip to content

Commit 45fa52c

Browse files
committed
Adjust the Waiters related javadocs
1 parent ed1b2ca commit 45fa52c

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

codegen/src/main/java/software/amazon/awssdk/codegen/docs/WaiterDocs.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ public static CodeBlock waiterOperationJavadoc(ClassName className, Map.Entry<St
4242
+ "enter into the desired state")
4343
.param(operationModel.getInput().getVariableName(), "the request to be used"
4444
+ " for polling")
45-
.returns("WaiterResponse containing either a response or an exception that "
46-
+ "has matched with the waiter success condition")
45+
.returns(className.simpleName().contains("Async") ?
46+
"CompletableFuture of the WaiterResponse containing either a "
47+
+ "response or an exception that has matched with the waiter "
48+
+ "success condition"
49+
: "WaiterResponse containing either a response or an exception that"
50+
+ " has matched with the waiter success condition")
4751
.build();
4852
return CodeBlock.builder()
4953
.add(javadocs, className, operationModel.getMethodName(), waiterDefinition.getKey())
@@ -64,8 +68,12 @@ public static CodeBlock waiterOperationConsumerBuilderJavadoc(ClassName clientCl
6468
+ "to create one manually using {@link $T.builder()} ")
6569
.param(operationModel.getInput().getVariableName(), "the request to be used"
6670
+ " for polling")
67-
.returns("WaiterResponse containing either a response or an exception that "
68-
+ "has matched with the waiter success condition")
71+
.returns(clientClassName.simpleName().contains("Async") ?
72+
"CompletableFuture of the WaiterResponse containing either a "
73+
+ "response or an exception that has matched with the waiter "
74+
+ "success condition"
75+
: "WaiterResponse containing either a response or an exception that"
76+
+ " has matched with the waiter success condition")
6977
.build();
7078
return CodeBlock.builder()
7179
.add(javadocs, clientClassName, operationModel.getMethodName(), waiterDefinition.getKey(),

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/waiters/query-async-waiter-interface.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public interface QueryAsyncWaiter extends SdkAutoCloseable {
2525
*
2626
* @param aPostOperationRequest
2727
* the request to be used for polling
28-
* @return WaiterResponse containing either a response or an exception that has matched with the waiter success
28+
* @return CompletableFuture of the WaiterResponse containing either a response or an exception that has matched with the waiter success
2929
* condition
3030
*/
3131
default CompletableFuture<WaiterResponse<APostOperationResponse>> waitUntilPostOperationSuccess(
@@ -42,7 +42,7 @@ default CompletableFuture<WaiterResponse<APostOperationResponse>> waitUntilPostO
4242
*
4343
* @param aPostOperationRequest
4444
* the request to be used for polling
45-
* @return WaiterResponse containing either a response or an exception that has matched with the waiter success
45+
* @return CompletableFuture of the WaiterResponse containing either a response or an exception that has matched with the waiter success
4646
* condition
4747
*/
4848
default CompletableFuture<WaiterResponse<APostOperationResponse>> waitUntilPostOperationSuccess(

core/sdk-core/src/main/java/software/amazon/awssdk/core/waiters/WaiterOverrideConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import software.amazon.awssdk.utils.Validate;
2323

2424
/**
25-
* Configuration values for the {@link Waiter}. All values are optional, and not specifying them
26-
* will use the default values.
25+
* Configuration values for the {@link Waiter}. All values are optional, and the default values will be used
26+
* if they are not specified.
2727
*/
2828
@SdkPublicApi
2929
public final class WaiterOverrideConfiguration {

0 commit comments

Comments
 (0)