-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Storage to azure-core preview 3 #4482
Changes from all commits
1ec9438
78db8d4
69026ba
be429c3
10a85ad
593ebf2
b00cdc6
da7ebb6
78ea66b
b602214
9cbf411
44fb56e
822b41d
fe9559f
53b2854
e19ea2b
7149824
efc335c
87f3090
5ce9473
28beb79
2318c30
62c2dfc
a5bc2dd
a2b67ea
6fcd538
889a7ff
03c3e3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,7 @@ public class BlobAsyncClient { | |
public BlockBlobAsyncClient asBlockBlobAsyncClient() { | ||
return new BlockBlobAsyncClient(new AzureBlobStorageBuilder() | ||
.url(getBlobUrl().toString()) | ||
.pipeline(azureBlobStorage.httpPipeline()), snapshot); | ||
.pipeline(azureBlobStorage.getHttpPipeline()), snapshot); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Jianghao to start discussion with James and Jonathan |
||
} | ||
|
||
/** | ||
|
@@ -110,7 +110,7 @@ public BlockBlobAsyncClient asBlockBlobAsyncClient() { | |
public AppendBlobAsyncClient asAppendBlobAsyncClient() { | ||
return new AppendBlobAsyncClient(new AzureBlobStorageBuilder() | ||
.url(getBlobUrl().toString()) | ||
.pipeline(azureBlobStorage.httpPipeline()), snapshot); | ||
.pipeline(azureBlobStorage.getHttpPipeline()), snapshot); | ||
} | ||
|
||
/** | ||
|
@@ -122,7 +122,7 @@ public AppendBlobAsyncClient asAppendBlobAsyncClient() { | |
public PageBlobAsyncClient asPageBlobAsyncClient() { | ||
return new PageBlobAsyncClient(new AzureBlobStorageBuilder() | ||
.url(getBlobUrl().toString()) | ||
.pipeline(azureBlobStorage.httpPipeline()), snapshot); | ||
.pipeline(azureBlobStorage.getHttpPipeline()), snapshot); | ||
} | ||
|
||
/** | ||
|
@@ -136,7 +136,7 @@ public ContainerAsyncClient getContainerAsyncClient() { | |
BlobURLParts parts = URLParser.parse(getBlobUrl()); | ||
return new ContainerAsyncClient(new AzureBlobStorageBuilder() | ||
.url(String.format("%s://%s/%s", parts.scheme(), parts.host(), parts.containerName())) | ||
.pipeline(azureBlobStorage.httpPipeline())); | ||
.pipeline(azureBlobStorage.getHttpPipeline())); | ||
} | ||
|
||
/** | ||
|
@@ -147,13 +147,13 @@ public ContainerAsyncClient getContainerAsyncClient() { | |
*/ | ||
public URL getBlobUrl() { | ||
try { | ||
UrlBuilder urlBuilder = UrlBuilder.parse(azureBlobStorage.url()); | ||
UrlBuilder urlBuilder = UrlBuilder.parse(azureBlobStorage.getUrl()); | ||
if (snapshot != null) { | ||
urlBuilder.query("snapshot=" + snapshot); | ||
} | ||
return urlBuilder.toURL(); | ||
} catch (MalformedURLException e) { | ||
throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.url()), e); | ||
throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.getUrl()), e); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI: This will very shortly result in CheckStyle check failure, as the |
||
} | ||
} | ||
|
||
|
@@ -925,7 +925,7 @@ public String generateSAS(String identifier, BlobSASPermission permissions, Offs | |
cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); | ||
|
||
SharedKeyCredential sharedKeyCredential = | ||
Utility.getSharedKeyCredential(this.azureBlobStorage.httpPipeline()); | ||
Utility.getSharedKeyCredential(this.azureBlobStorage.getHttpPipeline()); | ||
|
||
Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); | ||
|
||
|
@@ -944,7 +944,7 @@ ServiceSASSignatureValues configureServiceSASSignatureValues(ServiceSASSignature | |
String accountName) { | ||
|
||
// Set canonical name | ||
serviceSASSignatureValues.canonicalName(this.azureBlobStorage.url(), accountName); | ||
serviceSASSignatureValues.canonicalName(this.azureBlobStorage.getUrl(), accountName); | ||
|
||
// Set snapshotId | ||
serviceSASSignatureValues.snapshotId(getSnapshotId()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Move the
.build()
onto the same line.