From 4b3806db1e85b8dc8fa3eeb56a5c08b3ac36c62c Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Thu, 19 Dec 2024 12:58:11 -0800 Subject: [PATCH] Check for null BlobAccessType in azureblob-sdk References #606. --- src/main/java/org/gaul/s3proxy/azureblob/AzureBlobStore.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gaul/s3proxy/azureblob/AzureBlobStore.java b/src/main/java/org/gaul/s3proxy/azureblob/AzureBlobStore.java index 69d818b..ea7e4fb 100644 --- a/src/main/java/org/gaul/s3proxy/azureblob/AzureBlobStore.java +++ b/src/main/java/org/gaul/s3proxy/azureblob/AzureBlobStore.java @@ -524,7 +524,8 @@ public final class AzureBlobStore extends BaseBlobStore { public ContainerAccess getContainerAccess(String container) { var client = blobServiceClient.getBlobContainerClient(container); try { - return client.getAccessPolicy().getBlobAccessType().equals( + var blobAccessType = client.getAccessPolicy().getBlobAccessType(); + return blobAccessType != null && blobAccessType.equals( PublicAccessType.CONTAINER) ? ContainerAccess.PUBLIC_READ : ContainerAccess.PRIVATE;