Skip to content

Commit 32b529f

Browse files
committed
Add comments
1 parent d2b6063 commit 32b529f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/async/ByteArrayAsyncResponseTransformer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ public final class ByteArrayAsyncResponseTransformer<ResponseT> implements
4747
@Override
4848
public CompletableFuture<ResponseBytes<ResponseT>> prepare() {
4949
cf = new CompletableFuture<>();
50+
// Using fromByteArrayUnsafe() to avoid unnecessary extra copying of byte array. The data writing has completed and the
51+
// byte array will not be further modified so this is safe
5052
return cf.thenApply(arr -> ResponseBytes.fromByteArrayUnsafe(response, arr));
5153
}
5254

0 commit comments

Comments
 (0)