diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 4dfc9b988b77e..8e98cd6284911 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -1374,7 +1374,7 @@ public Mono>> getTagsWithResponse(BlobGetTagsOption } Mono>> getTagsWithResponse(BlobGetTagsOptions options, Context context) { - StorageImplUtils.assertNotNull("options", options); + options = (options == null) ? new BlobGetTagsOptions() : options; BlobRequestConditions requestConditions = (options.getRequestConditions() == null) ? new BlobRequestConditions() : options.getRequestConditions(); return this.azureBlobStorage.blobs().getTagsWithRestResponseAsync(null, null, null, null, snapshot, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java index d1b339f9dd0ce..5c82b413fcd29 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java @@ -241,7 +241,7 @@ public Mono> renewLeaseWithResponse(BlobRenewLeaseOptions optio } Mono> renewLeaseWithResponse(BlobRenewLeaseOptions options, Context context) { - StorageImplUtils.assertNotNull("options", options); + options = (options == null) ? new BlobRenewLeaseOptions() : options; BlobLeaseRequestConditions requestConditions = (options.getRequestConditions() == null) ? new BlobLeaseRequestConditions() : options.getRequestConditions(); context = context == null ? Context.NONE : context; @@ -321,7 +321,7 @@ public Mono> releaseLeaseWithResponse(BlobReleaseLeaseOptions opt } Mono> releaseLeaseWithResponse(BlobReleaseLeaseOptions options, Context context) { - StorageImplUtils.assertNotNull("options", options); + options = (options == null) ? new BlobReleaseLeaseOptions() : options; BlobLeaseRequestConditions requestConditions = (options.getRequestConditions() == null) ? new BlobLeaseRequestConditions() : options.getRequestConditions(); context = context == null ? Context.NONE : context; @@ -414,7 +414,7 @@ public Mono> breakLeaseWithResponse(BlobBreakLeaseOptions opti } Mono> breakLeaseWithResponse(BlobBreakLeaseOptions options, Context context) { - StorageImplUtils.assertNotNull("options", options); + options = (options == null) ? new BlobBreakLeaseOptions() : options; BlobLeaseRequestConditions requestConditions = (options.getRequestConditions() == null) ? new BlobLeaseRequestConditions() : options.getRequestConditions(); context = context == null ? Context.NONE : context;