Skip to content

Commit 803c550

Browse files
Polish docs and formatting (#1391)
1 parent 399a261 commit 803c550

File tree

6 files changed

+30
-31
lines changed

6 files changed

+30
-31
lines changed

docs/src/main/asciidoc/_configprops.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
|spring.cloud.aws.dynamodb.endpoint | | Overrides the default endpoint.
3333
|spring.cloud.aws.dynamodb.region | | Overrides the default region.
3434
|spring.cloud.aws.dynamodb.table-prefix | | The prefix used to resolve table names.
35+
|spring.cloud.aws.dynamodb.table-separator | | The word separator used to resolve table names.
3536
|spring.cloud.aws.dynamodb.table-suffix | | The suffix used to resolve table names.
3637
|spring.cloud.aws.endpoint | | Overrides the default endpoint for all auto-configured AWS clients.
3738
|spring.cloud.aws.fips-enabled | | Configure whether the SDK should use the AWS fips endpoints.
@@ -93,10 +94,10 @@
9394
|spring.cloud.aws.sqs.enabled | `+++true+++` | Enables SQS integration.
9495
|spring.cloud.aws.sqs.endpoint | | Overrides the default endpoint.
9596
|spring.cloud.aws.sqs.listener.max-concurrent-messages | | The maximum concurrent messages that can be processed simultaneously for each queue. Note that if acknowledgement batching is being used, the actual maximum number of messages inflight might be higher.
97+
|spring.cloud.aws.sqs.listener.max-delay-between-polls | | The maximum amount of time to wait between consecutive polls to SQS.
9698
|spring.cloud.aws.sqs.listener.max-messages-per-poll | | The maximum number of messages to be retrieved in a single poll to SQS.
9799
|spring.cloud.aws.sqs.listener.poll-timeout | | The maximum amount of time for a poll to SQS.
98-
|spring.cloud.aws.sqs.listener.max-delay-between-polls | | The maximum amount of time to wait between consecutive polls to SQS.
99-
|spring.cloud.aws.sqs.queue-not-found-strategy | |
100+
|spring.cloud.aws.sqs.queue-not-found-strategy | |
100101
|spring.cloud.aws.sqs.region | | Overrides the default region.
101102

102103
|===

docs/src/main/asciidoc/s3.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public class MyAesProvider implements S3AesProvider {
211211
----
212212

213213

214-
==== S3 Output Stream
214+
=== S3 Output Stream
215215

216216
Under the hood by default `S3Resource` uses a `io.awspring.cloud.s3.InMemoryBufferingS3OutputStream`. When data is written to the resource, is gets sent to S3 using multipart upload.
217217
If a network error occurs during upload, `S3Client` has a built-in retry mechanism that will retry each failed part. If the upload fails after retries, multipart upload gets aborted and `S3Resource` throws `io.awspring.cloud.s3.S3Exception`.
@@ -231,7 +231,7 @@ try (OutputStream outputStream = s3Resource.getOutputStream()) {
231231

232232
If you are using the `S3TransferManager`, the default implementation will switch to `io.awspring.cloud.s3.TransferManagerS3OutputStream`. This OutputStream also uses a temporary file to write it on disk before uploading it to S3, but it may be faster as it uses a multi-part upload under the hood.
233233

234-
==== Searching resources
234+
=== Searching resources
235235

236236
The Spring resource loader also supports collecting resources based on an Ant-style path specification. Spring Cloud AWS
237237
offers the same support to resolve resources within a bucket and even throughout buckets. The actual resource loader needs

spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/s3/S3CrtAsyncClientAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* @since 3.0
4646
*/
4747
@AutoConfiguration
48-
@ConditionalOnClass({ S3Client.class, S3AsyncClient.class, AwsCrtHttpClient.class})
48+
@ConditionalOnClass({ S3Client.class, S3AsyncClient.class, AwsCrtHttpClient.class })
4949
@EnableConfigurationProperties({ S3Properties.class })
5050
@ConditionalOnProperty(name = "spring.cloud.aws.s3.enabled", havingValue = "true", matchIfMissing = true)
5151
@AutoConfigureBefore(S3TransferManagerAutoConfiguration.class)

spring-cloud-aws-dynamodb/src/main/java/io/awspring/cloud/dynamodb/DefaultDynamoDbTableNameResolver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public DefaultDynamoDbTableNameResolver(@Nullable String tablePrefix, @Nullable
5252
}
5353

5454
public DefaultDynamoDbTableNameResolver(@Nullable String tablePrefix, @Nullable String tableSuffix,
55-
@Nullable String tableSeparator) {
55+
@Nullable String tableSeparator) {
5656
this.tablePrefix = tablePrefix;
5757
this.tableSuffix = tableSuffix;
5858
this.tableSeparator = tableSeparator;
@@ -66,9 +66,9 @@ public String resolve(Class clazz) {
6666
String suffix = StringUtils.hasText(tableSuffix) ? tableSuffix : "";
6767
String separator = StringUtils.hasText(tableSeparator) ? tableSeparator : "_";
6868

69-
return prefix
70-
.concat(clazz.getSimpleName().replaceAll("(.)(\\p{Lu})", "$1" + separator + "$2").toLowerCase(Locale.ROOT))
71-
.concat(suffix);
69+
return prefix.concat(
70+
clazz.getSimpleName().replaceAll("(.)(\\p{Lu})", "$1" + separator + "$2").toLowerCase(Locale.ROOT))
71+
.concat(suffix);
7272
}
7373

7474
}

spring-cloud-aws-sqs/src/test/java/io/awspring/cloud/sqs/listener/adapter/AbstractMethodInvokingListenerAdapterTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ void shouldWrapError() throws Exception {
8080
Error error = new Error("Expected exception from shouldWrapError");
8181
when(handlerMethod.invoke(message)).thenThrow(error);
8282
AbstractMethodInvokingListenerAdapter<Object> adapter = new AbstractMethodInvokingListenerAdapter<Object>(
83-
handlerMethod) {
83+
handlerMethod) {
8484
};
8585
assertThatThrownBy(() -> adapter.invokeHandler(message)).isInstanceOf(ListenerExecutionFailedException.class)
86-
.asInstanceOf(type(ListenerExecutionFailedException.class))
87-
.extracting(ListenerExecutionFailedException::getFailedMessage).isEqualTo(message);
86+
.asInstanceOf(type(ListenerExecutionFailedException.class))
87+
.extracting(ListenerExecutionFailedException::getFailedMessage).isEqualTo(message);
8888
}
8989

9090
@Test
@@ -144,11 +144,11 @@ void shouldWrapErrorBatch() throws Exception {
144144
Error error = new Error("Expected exception from shouldWrapErrorBatch");
145145
when(handlerMethod.invoke(any(Message.class))).thenThrow(error);
146146
AbstractMethodInvokingListenerAdapter<Object> adapter = new AbstractMethodInvokingListenerAdapter<Object>(
147-
handlerMethod) {
147+
handlerMethod) {
148148
};
149149
assertThatThrownBy(() -> adapter.invokeHandler(batch)).isInstanceOf(ListenerExecutionFailedException.class)
150-
.asInstanceOf(type(ListenerExecutionFailedException.class))
151-
.extracting(ListenerExecutionFailedException::getFailedMessages).isEqualTo(batch);
150+
.asInstanceOf(type(ListenerExecutionFailedException.class))
151+
.extracting(ListenerExecutionFailedException::getFailedMessages).isEqualTo(batch);
152152
}
153153

154154
}

spring-cloud-aws-sqs/src/test/java/io/awspring/cloud/sqs/listener/adapter/AsyncMessagingMessageListenerAdapterTests.java

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,16 @@ void shouldReturnFailedFutureOnThrownError() throws Exception {
8080
MessageHeaders headers = new MessageHeaders(null);
8181
InvocableHandlerMethod handlerMethod = mock(InvocableHandlerMethod.class);
8282
Message<Object> message = mock(Message.class);
83-
Error error = new Error(
84-
"Expected exception from shouldReturnFailedFutureOnThrownError");
83+
Error error = new Error("Expected exception from shouldReturnFailedFutureOnThrownError");
8584
given(message.getHeaders()).willReturn(headers);
8685
given(handlerMethod.invoke(message)).willThrow(error);
8786
AsyncMessageListener<Object> adapter = new AsyncMessagingMessageListenerAdapter<>(handlerMethod);
8887
CompletableFuture<Void> result = adapter.onMessage(message);
8988
assertThat(result).isCompletedExceptionally();
9089
assertThatThrownBy(result::join).isInstanceOf(CompletionException.class).extracting(Throwable::getCause)
91-
.isInstanceOf(ListenerExecutionFailedException.class)
92-
.asInstanceOf(type(ListenerExecutionFailedException.class))
93-
.extracting(ListenerExecutionFailedException::getFailedMessage).isEqualTo(message);
90+
.isInstanceOf(ListenerExecutionFailedException.class)
91+
.asInstanceOf(type(ListenerExecutionFailedException.class))
92+
.extracting(ListenerExecutionFailedException::getFailedMessage).isEqualTo(message);
9493
}
9594

9695
@Test
@@ -122,9 +121,9 @@ void shouldWrapCompletionError() throws Exception {
122121
CompletableFuture<Void> result = adapter.onMessage(message);
123122
assertThat(result).isCompletedExceptionally();
124123
assertThatThrownBy(result::join).isInstanceOf(CompletionException.class).extracting(Throwable::getCause)
125-
.isInstanceOf(ListenerExecutionFailedException.class)
126-
.asInstanceOf(type(ListenerExecutionFailedException.class))
127-
.extracting(ListenerExecutionFailedException::getFailedMessage).isEqualTo(message);
124+
.isInstanceOf(ListenerExecutionFailedException.class)
125+
.asInstanceOf(type(ListenerExecutionFailedException.class))
126+
.extracting(ListenerExecutionFailedException::getFailedMessage).isEqualTo(message);
128127
}
129128

130129
@Test
@@ -192,8 +191,7 @@ void shouldReturnFailedFutureOnErrorBatch() throws Exception {
192191
List<Message<Object>> messages = Arrays.asList(message1, message2, message3);
193192
MessageHeaders headers = new MessageHeaders(null);
194193
InvocableHandlerMethod handlerMethod = mock(InvocableHandlerMethod.class);
195-
Error error = new Error(
196-
"Expected exception from shouldReturnFailedFutureOnErrorBatch");
194+
Error error = new Error("Expected exception from shouldReturnFailedFutureOnErrorBatch");
197195
given(message1.getHeaders()).willReturn(headers);
198196
given(message2.getHeaders()).willReturn(headers);
199197
given(message3.getHeaders()).willReturn(headers);
@@ -202,9 +200,9 @@ void shouldReturnFailedFutureOnErrorBatch() throws Exception {
202200
CompletableFuture<Void> result = adapter.onMessage(messages);
203201
assertThat(result).isCompletedExceptionally();
204202
assertThatThrownBy(result::join).isInstanceOf(CompletionException.class).extracting(Throwable::getCause)
205-
.isInstanceOf(ListenerExecutionFailedException.class)
206-
.asInstanceOf(type(ListenerExecutionFailedException.class))
207-
.extracting(ListenerExecutionFailedException::getFailedMessages).isEqualTo(messages);
203+
.isInstanceOf(ListenerExecutionFailedException.class)
204+
.asInstanceOf(type(ListenerExecutionFailedException.class))
205+
.extracting(ListenerExecutionFailedException::getFailedMessages).isEqualTo(messages);
208206
}
209207

210208
@Test
@@ -246,9 +244,9 @@ void shouldWrapCompletionErrorBatch() throws Exception {
246244
CompletableFuture<Void> result = adapter.onMessage(messages);
247245
assertThat(result).isCompletedExceptionally();
248246
assertThatThrownBy(result::join).isInstanceOf(CompletionException.class).extracting(Throwable::getCause)
249-
.isInstanceOf(ListenerExecutionFailedException.class)
250-
.asInstanceOf(type(ListenerExecutionFailedException.class))
251-
.extracting(ListenerExecutionFailedException::getFailedMessages).isEqualTo(messages);
247+
.isInstanceOf(ListenerExecutionFailedException.class)
248+
.asInstanceOf(type(ListenerExecutionFailedException.class))
249+
.extracting(ListenerExecutionFailedException::getFailedMessages).isEqualTo(messages);
252250
}
253251

254252
@Test

0 commit comments

Comments
 (0)