From afb2270f660bc46c2d8290ac8305f5a7874416e2 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Fri, 15 Dec 2023 16:30:57 +0000 Subject: [PATCH] Fix null Azure CDN endpoint variable on credential binding --- .../windowsazurestorage/helper/AzureCredentialsBinding.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/microsoftopentechnologies/windowsazurestorage/helper/AzureCredentialsBinding.java b/src/main/java/com/microsoftopentechnologies/windowsazurestorage/helper/AzureCredentialsBinding.java index 023f76f..ef773ac 100644 --- a/src/main/java/com/microsoftopentechnologies/windowsazurestorage/helper/AzureCredentialsBinding.java +++ b/src/main/java/com/microsoftopentechnologies/windowsazurestorage/helper/AzureCredentialsBinding.java @@ -102,7 +102,9 @@ public MultiEnvironment bind(@NonNull Run build, variableMap.put(getStorageAccountNameVariable(), credentials.getStorageAccountName()); variableMap.put(getStorageAccountKeyVariable(), credentials.getPlainStorageKey()); variableMap.put(getBlobEndpointUrlVariable(), credentials.getBlobEndpointURL()); - variableMap.put(getCdnEndpointUrlVariable(), credentials.getCdnEndpointURL()); + if (credentials.getCdnEndpointURL() != null) { + variableMap.put(getCdnEndpointUrlVariable(), credentials.getCdnEndpointURL()); + } return new MultiEnvironment(variableMap); }