diff --git a/.doc_gen/metadata/cloudfront_metadata.yaml b/.doc_gen/metadata/cloudfront_metadata.yaml
index ff1467cd95c..c64811b1871 100644
--- a/.doc_gen/metadata/cloudfront_metadata.yaml
+++ b/.doc_gen/metadata/cloudfront_metadata.yaml
@@ -92,7 +92,7 @@ cloudfront_CreateDistribution:
sdkguide:
excerpts:
- description: >-
- The following example uses an &S3long; (&S3;) bucket as a content origin.
+ The following example uses an &S3long; (&S3;) bucket as a content origin.
After creating the distribution,
the code creates a CloudFrontWaiter
to wait until the distribution is deployed before returning the distribution.
diff --git a/javav2/example_code/sqs/src/main/java/com/example/sqs/SQSExample.java b/javav2/example_code/sqs/src/main/java/com/example/sqs/SQSExample.java
index 0a46d4d2305..be377d7da1e 100644
--- a/javav2/example_code/sqs/src/main/java/com/example/sqs/SQSExample.java
+++ b/javav2/example_code/sqs/src/main/java/com/example/sqs/SQSExample.java
@@ -67,13 +67,13 @@ public static String createQueue(SqsClient sqsClient, String queueName) {
GetQueueUrlResponse getQueueUrlResponse = sqsClient
.getQueueUrl(GetQueueUrlRequest.builder().queueName(queueName).build());
return getQueueUrlResponse.queueUrl();
+ // snippet-end:[sqs.java2.sqs_example.get_queue]
} catch (SqsException e) {
System.err.println(e.awsErrorDetails().errorMessage());
System.exit(1);
}
return "";
- // snippet-end:[sqs.java2.sqs_example.get_queue]
}
public static void listQueues(SqsClient sqsClient) {
@@ -148,8 +148,8 @@ public static void sendBatchMessages(SqsClient sqsClient, String queueUrl) {
public static List receiveMessages(SqsClient sqsClient, String queueUrl) {
System.out.println("\nReceive messages");
+ // snippet-start:[sqs.java2.sqs_example.retrieve_messages]
try {
- // snippet-start:[sqs.java2.sqs_example.retrieve_messages]
ReceiveMessageRequest receiveMessageRequest = ReceiveMessageRequest.builder()
.queueUrl(queueUrl)
.maxNumberOfMessages(5)
@@ -186,8 +186,8 @@ public static void changeMessages(SqsClient sqsClient, String queueUrl, List messages) {
System.out.println("\nDelete Messages");
- // snippet-start:[sqs.java2.sqs_example.delete_message]
+ // snippet-start:[sqs.java2.sqs_example.delete_message]
try {
for (Message message : messages) {
DeleteMessageRequest deleteMessageRequest = DeleteMessageRequest.builder()
@@ -196,12 +196,11 @@ public static void deleteMessages(SqsClient sqsClient, String queueUrl, List