From 5981f272e5df9ad04b91cd719416f4cfe996ffce Mon Sep 17 00:00:00 2001 From: Kurru Date: Wed, 27 Jul 2022 17:22:07 -0700 Subject: [PATCH] Add javadoc to Subsegment.close() method. (#342) This method should not be used externally in general. See https://github.com/aws/aws-xray-sdk-java/issues/318 for details. --- .../java/com/amazonaws/xray/entities/Subsegment.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aws-xray-recorder-sdk-core/src/main/java/com/amazonaws/xray/entities/Subsegment.java b/aws-xray-recorder-sdk-core/src/main/java/com/amazonaws/xray/entities/Subsegment.java index 750b54d8..af6bc221 100644 --- a/aws-xray-recorder-sdk-core/src/main/java/com/amazonaws/xray/entities/Subsegment.java +++ b/aws-xray-recorder-sdk-core/src/main/java/com/amazonaws/xray/entities/Subsegment.java @@ -87,7 +87,7 @@ static Subsegment noOp(Segment parent, AWSXRayRecorder recorder) { /** * Serializes the subsegment as a standalone String with enough information for the subsegment to be streamed on its own. * @return - * the string representation of the subsegment with enouogh information for it to be streamed + * the string representation of the subsegment with enough information for it to be streamed */ String streamSerialize(); @@ -96,10 +96,16 @@ static Subsegment noOp(Segment parent, AWSXRayRecorder recorder) { * own. Only used for debugging. * * @return - * the pretty string representation of the subsegment with enouogh information for it to be streamed + * the pretty string representation of the subsegment with enough information for it to be streamed */ String prettyStreamSerialize(); + /** + * Implements the {@link AutoCloseable} interface. + * + * Warning. This method is intended to be private to the xray library and should not be used externally. Instead, use + * {@link com.amazonaws.xray.AWSXRay#endSubsegment(Subsegment)}. + */ @Override void close(); }