Source:
<code>private static CloudBlobContainer getBlobContainerReference(StorageAccountInfo storageAccount, String containerName, boolean createCnt, boolean allowRetry, Boolean cntPubAccess) throws URISyntaxException, StorageException { CloudStorageAccount cloudStorageAccount; CloudBlobClient serviceClient; CloudBlobContainer container; StorageCredentialsAccountAndKey credentials; String accName = storageAccount.getStorageAccName(); String blobURL = storageAccount.getBlobEndPointURL(); credentials = new StorageCredentialsAccountAndKey(accName, storageAccount.getStorageAccountKey()); if (Utils.isNullOrEmpty(blobURL) || blobURL.equals(Utils.DEF_BLOB_URL)) { cloudStorageAccount = new CloudStorageAccount(credentials); } else { String endpointSuffix = getEndpointSuffix(blobURL); if(Utils.isNullOrEmpty(endpointSuffix)) throw new URISyntaxException(blobURL,"The blob endpoint is not correct!"); <START> cloudStorageAccount = new CloudStorageAccount(credentials, false, getEndpointSuffix(blobURL)); <END> } serviceClient = cloudStorageAccount.createCloudBlobClient(); if (!allowRetry) { RetryNoRetry rnr = new RetryNoRetry(); serviceClient.getDefaultRequestOptions().setRetryPolicyFactory(rnr); } container = serviceClient.getContainerReference(containerName); boolean cntExists = container.exists(); if (createCnt && !cntExists) { container.createIfNotExists(); } if (!cntExists && cntPubAccess != null) { BlobContainerPermissions cntPerm; cntPerm = new BlobContainerPermissions(); if (cntPubAccess) { cntPerm.setPublicAccess(BlobContainerPublicAccessType.CONTAINER); } else { cntPerm.setPublicAccess(BlobContainerPublicAccessType.OFF); } container.uploadPermissions(cntPerm); } return container; }</code><technical_language>call getEndpointSuffix again</technical_language>

Target:
private static CloudBlobContainer getBlobContainerReference(StorageAccountInfo storageAccount, String containerName, boolean createCnt, boolean allowRetry, Boolean cntPubAccess) throws URISyntaxException, StorageException { CloudStorageAccount cloudStorageAccount; CloudBlobClient serviceClient; CloudBlobContainer container; StorageCredentialsAccountAndKey credentials; String accName = storageAccount.getStorageAccName(); String blobURL = storageAccount.getBlobEndPointURL(); credentials = new StorageCredentialsAccountAndKey(accName, storageAccount.getStorageAccountKey()); if (Utils.isNullOrEmpty(blobURL) || blobURL.equals(Constants.DEF_BLOB_URL)) { cloudStorageAccount = new CloudStorageAccount(credentials); } else { String endpointSuffix = getEndpointSuffix(blobURL); if(Utils.isNullOrEmpty(endpointSuffix)) throw new URISyntaxException(blobURL,"The blob endpoint is not correct!"); cloudStorageAccount = new CloudStorageAccount(credentials, false, endpointSuffix); } serviceClient = cloudStorageAccount.createCloudBlobClient(); if (!allowRetry) { RetryNoRetry rnr = new RetryNoRetry(); serviceClient.getDefaultRequestOptions().setRetryPolicyFactory(rnr); } container = serviceClient.getContainerReference(containerName); boolean cntExists = container.exists(); if (createCnt && !cntExists) { container.createIfNotExists(); } if (!cntExists && cntPubAccess != null) { BlobContainerPermissions cntPerm; cntPerm = new BlobContainerPermissions(); if (cntPubAccess) { cntPerm.setPublicAccess(BlobContainerPublicAccessType.CONTAINER); } else { cntPerm.setPublicAccess(BlobContainerPublicAccessType.OFF); } container.uploadPermissions(cntPerm); } return container; }