jelmini commented on a change in pull request #510:
URL: https://github.com/apache/jackrabbit-oak/pull/510#discussion_r833541080
##########
File path:
oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/cli/node/SegmentAzureFactory.java
##########
@@ -143,11 +159,16 @@ private AzurePersistence createAzurePersistence() throws
StorageException, URISy
CloudBlobDirectory cloudBlobDirectory = null;
if (accountName != null && uri != null) {
- String key = System.getenv("AZURE_SECRET_KEY");
- StorageCredentials credentials = new
StorageCredentialsAccountAndKey(accountName, key);
+ StorageCredentials credentials;
+ if (!StringUtils.isBlank(sasToken)) {
+ credentials = new
StorageCredentialsSharedAccessSignature(sasToken);
+ } else {
+ String key = System.getenv("AZURE_SECRET_KEY");
+ credentials = new StorageCredentialsAccountAndKey(accountName,
key);
+ }
cloudBlobDirectory =
AzureUtilities.cloudBlobDirectoryFrom(credentials, uri, dir);
} else if (connectionString != null && containerName != null) {
- cloudBlobDirectory =
AzureUtilities.cloudBlobDirectoryFrom(connectionString, containerName, dir);
+ cloudBlobDirectory =
AzureUtilities.cloudBlobDirectoryFrom(connectionString, containerName,
dir,skipCreateContainer);
Review comment:
Formatting: space after comma.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]