Skip to content

Commit f6c5e9f

Browse files
authored
Fixing cloudfront signer logic, and changelog (#5892)
* Fixing cloudfront signer logic, and documentation * Removing unused commit --------- Co-authored-by: Ran Vaknin <[email protected]>
1 parent 56d82d0 commit f6c5e9f

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

.changes/2.30.23.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "bugfix",
77
"category": "Amazon Cloudfront",
88
"contributor": "",
9-
"description": "Decouple policy logic from resource url for getSignedUrlWithCustomPolicy"
9+
"description": "Allow users to specify resource URL pattern in `CloudFrontUtilities#getSignedUrlWithCustomPolicy`. See [#5577](https://github.com/aws/aws-sdk-java-v2/issues/5577)"
1010
},
1111
{
1212
"type": "feature",

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195

196196
## __Amazon Cloudfront__
197197
- ### Bugfixes
198-
- Decouple policy logic from resource url for getSignedUrlWithCustomPolicy
198+
- Allow users to specify resource URL pattern in `CloudFrontUtilities#getSignedUrlWithCustomPolicy`. See [#5577](https://github.com/aws/aws-sdk-java-v2/issues/5577)
199199

200200
## __Amazon EMR Containers__
201201
- ### Features

services/cloudfront/src/main/java/software/amazon/awssdk/services/cloudfront/CloudFrontUtilities.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import software.amazon.awssdk.services.cloudfront.model.CannedSignerRequest;
3434
import software.amazon.awssdk.services.cloudfront.model.CustomSignerRequest;
3535
import software.amazon.awssdk.services.cloudfront.url.SignedUrl;
36-
import software.amazon.awssdk.utils.StringUtils;
3736

3837
/**
3938
*
@@ -258,7 +257,7 @@ public SignedUrl getSignedUrlWithCustomPolicy(Consumer<CustomSignerRequest.Build
258257
public SignedUrl getSignedUrlWithCustomPolicy(CustomSignerRequest request) {
259258
String resourceUrl = request.resourceUrl();
260259
try {
261-
String resourceUrlPattern = StringUtils.isEmpty(request.resourceUrlPattern())
260+
String resourceUrlPattern = request.resourceUrlPattern() == null
262261
? request.resourceUrl()
263262
: request.resourceUrlPattern();
264263

0 commit comments

Comments
 (0)