Skip to content

Commit

Permalink
OAK-10049 - Move config before call to getAzureContainer().
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Hanikel committed Feb 6, 2023
1 parent 57e608c commit 6e4c00e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ public void init() throws DataStoreException {
presignedDownloadURIVerifyExists = PropertiesUtil.toBoolean(
Strings.emptyToNull(properties.getProperty(AzureConstants.PRESIGNED_HTTP_DOWNLOAD_URI_VERIFY_EXISTS)), true);

enableSecondaryLocation = PropertiesUtil.toBoolean(
properties.getProperty(AzureConstants.AZURE_BLOB_ENABLE_SECONDARY_LOCATION_NAME),
AzureConstants.AZURE_BLOB_ENABLE_SECONDARY_LOCATION_DEFAULT
);

CloudBlobContainer azureContainer = getAzureContainer();

if (createBlobContainer && azureContainer.createIfNotExists()) {
Expand Down Expand Up @@ -233,11 +238,6 @@ public void init() throws DataStoreException {
if (createRefSecretOnInit) {
getOrCreateReferenceKey();
}

enableSecondaryLocation = PropertiesUtil.toBoolean(
properties.getProperty(AzureConstants.AZURE_BLOB_ENABLE_SECONDARY_LOCATION_NAME),
AzureConstants.AZURE_BLOB_ENABLE_SECONDARY_LOCATION_DEFAULT
);
}
catch (StorageException e) {
throw new DataStoreException(e);
Expand Down

0 comments on commit 6e4c00e

Please sign in to comment.