From 5d2c153c6f77a0377d3c11c514c8116fb066fbec Mon Sep 17 00:00:00 2001 From: Pratik <4411711+the-codinator@users.noreply.github.com> Date: Wed, 24 Mar 2021 21:51:16 +0530 Subject: [PATCH 1/2] Actually return the "Response" from "BlobClient.uploadWithResponse(options,content)" All other variants of `...WithResponse` return their corresponding `Response` object, but this one is missing it. Adding to maintain consistency and fix intended usage. --- .../src/main/java/com/azure/storage/blob/BlobClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index 21c8299cded3..f9a7984b8dbd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -221,10 +221,10 @@ public void upload(BinaryData data, boolean overwrite) { * @param context Additional context that is passed through the Http pipeline during the service call. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void uploadWithResponse(InputStream data, long length, ParallelTransferOptions parallelTransferOptions, + public Response uploadWithResponse(InputStream data, long length, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions requestConditions, Duration timeout, Context context) { - this.uploadWithResponse(new BlobParallelUploadOptions(data, length) + return this.uploadWithResponse(new BlobParallelUploadOptions(data, length) .setParallelTransferOptions(parallelTransferOptions).setHeaders(headers).setMetadata(metadata).setTier(tier) .setRequestConditions(requestConditions), timeout, context); } From ba7e92455f9a6514084c7751a886ee90be008939 Mon Sep 17 00:00:00 2001 From: Pratik <4411711+the-codinator@users.noreply.github.com> Date: Wed, 24 Mar 2021 21:54:08 +0530 Subject: [PATCH 2/2] Update javadoc --- .../src/main/java/com/azure/storage/blob/BlobClient.java | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index f9a7984b8dbd..5cde8b8731a0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -219,6 +219,7 @@ public void upload(BinaryData data, boolean overwrite) { * @param requestConditions {@link BlobRequestConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. + * @return Information about the uploaded block blob. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response uploadWithResponse(InputStream data, long length, ParallelTransferOptions parallelTransferOptions,