Skip to content
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

Add EnvVar AZURE_AUTHORITY_HOST #9318

Closed
wants to merge 51 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b5f7596
Make azure resource creation can be disabled. (#7335)
mitchdenny Jan 10, 2020
a781f99
Keyvault ARM template for live test (#7340)
hemanttanwar Jan 10, 2020
a68aca1
Fix dyanmic resource deprovision (#7343)
danieljurek Jan 10, 2020
0213d7c
Update README.md
weshaggard Jan 10, 2020
dd6c261
Remove OpenCensus tracing support for Java SDKs (#7167)
samvaity Jan 10, 2020
574f7bc
port https://github.com/Azure/azure-sdk-for-java/pull/6835 from v4 (#…
moderakh Jan 10, 2020
409efc5
Return empty string on empty content response from backend (#7347)
kushagraThapar Jan 11, 2020
14c8c1d
Added missing variables from ARM deployment, fixed expected environme…
alzimmermsft Jan 13, 2020
10e4bd5
Initial commit to add API to retrieve min throughput for a CosmosCont…
abinav2307 Jan 13, 2020
0c76069
Support AM/PM in MSI token (#7356)
jianghaolu Jan 13, 2020
7a16996
Encryption client from regular client (#7242)
gapra-msft Jan 13, 2020
72f8152
Jan Release readme fix/ changes (#7395)
hemanttanwar Jan 13, 2020
eaad511
Post release version update (#7399)
kushagraThapar Jan 13, 2020
8c44c17
Update identity to 1.0.3 (#7398)
jianghaolu Jan 13, 2020
7d14750
Move cosmosdb to cosmos (#7384)
mitchdenny Jan 14, 2020
585add2
Disabld feature CI trigger. (#7363)
mitchdenny Jan 14, 2020
105660c
Update documentation and in-memory checkpoint store sample (#7389)
srnagar Jan 14, 2020
e9e5e53
Prep for doc warden updates (#7405)
chidozieononiwu Jan 14, 2020
9def363
Post identity 1.0.3 release version update (#7407)
jianghaolu Jan 14, 2020
379dddf
Continue to use same .receive() method on disconnection (#7336)
conniey Jan 14, 2020
f93ec77
Updated storage versions post January release (#7397)
gapra-msft Jan 14, 2020
48171b1
Fixed retry logic on writes on forbidden status (#7402)
kushagraThapar Jan 14, 2020
0f27ea7
Add az namespace span attribute for App config (#7097)
samvaity Jan 14, 2020
3670d35
[After MSAL 1.3] Pluggable HTTP in identity/msal (#7120)
jianghaolu Jan 14, 2020
5b62f09
[After Jan 7] Removing dependency on java.desktop module. (#6877)
JonathanGiles Jan 14, 2020
d68f40b
Lower branch coverage threshold for Identity (#7433)
srnagar Jan 15, 2020
572a47a
Update Download To File Write Logic (#7403)
alzimmermsft Jan 15, 2020
f819bb4
Updated release version to 3.6.0 (#7428)
kushagraThapar Jan 15, 2020
7232b92
Feature/release verify (#7386)
JimSuplizio Jan 15, 2020
a5aba4c
revert license changes (#7387)
sima-zhu Jan 15, 2020
44cc9c4
Update TextSentimentClass to extend ExpandableStringEnum (#7427)
samvaity Jan 15, 2020
74f58ab
Added an overload for listing with a continuation token (#7388)
gapra-msft Jan 15, 2020
62ceaf6
Added ability to create service clients anonymously (#7421)
gapra-msft Jan 15, 2020
ee1925d
Fixed upload from file using FluxUtil.write in a manner where the und…
alzimmermsft Jan 15, 2020
b89d97c
Added client side checks for account set props (#7426)
gapra-msft Jan 15, 2020
cc9158a
Post release version update to 3.7.0-beta.1 (#7478)
kushagraThapar Jan 15, 2020
481cf3b
fixes some bugs and add tests to improve code coveragwe (#7401)
mssfang Jan 15, 2020
3e65a46
Updated Readme and changelog for storage release (#7484)
gapra-msft Jan 15, 2020
bbeeed3
Placeholder pipeline for aggregate report generation. (#7486)
mitchdenny Jan 16, 2020
274ae66
Move aggregate reports up.: (#7487)
mitchdenny Jan 16, 2020
6b2c11e
Implements a slf4j logger impl as default logger in azure core (#7298)
sima-zhu Jan 16, 2020
9b198d6
Replace AutoCloseable with reactor's Disposable. Retry and timeout fi…
conniey Jan 16, 2020
fb3937a
Eventhubs ARM template for live test (#7344)
hemanttanwar Jan 16, 2020
3c3900a
Fix cancellation handling (#7430)
mitchdenny Jan 16, 2020
fc90101
add build qualifier to unreleased version (#7501)
JimSuplizio Jan 16, 2020
a18cd1a
Retry network operations in resources scripts (#7510)
heaths Jan 17, 2020
9ef4b0d
Fix up SDKType parameter condition. (#7512)
mitchdenny Jan 17, 2020
570f57f
Paged Flux abstractions (#6465)
anuchandy Jan 17, 2020
6b58732
Clears closed/errored sessions and links (#7534)
conniey Jan 18, 2020
e8f1f7b
add environment variable authorityhost
Luyunmt Mar 20, 2020
d96c366
add environment variable authorityhost
Luyunmt Mar 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added client side checks for account set props (#7426)
gapra-msft authored Jan 15, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b89d97ce958cabbfc3233b4f54eccdfea49e9fe3
1 change: 1 addition & 0 deletions sdk/storage/azure-storage-blob/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
## 12.3.0-beta.1 (Unreleased)
- Added ability to create service clients anonymously and should only be used to create anonymous container and blob clients. Anonymous service clients will throw on attempting to create network requests.
- Added an overload to listBlobs to include a continuation token.
- Added a check in BlobServiceClient.setAccountProperties to block invalid requests.

## 12.2.0 (2020-01-08)
This package's
Original file line number Diff line number Diff line change
@@ -20,6 +20,8 @@
import com.azure.storage.blob.implementation.models.ServiceGetAccountInfoHeaders;
import com.azure.storage.blob.implementation.models.ServicesListBlobContainersSegmentResponse;
import com.azure.storage.blob.models.BlobContainerItem;
import com.azure.storage.blob.models.BlobCorsRule;
import com.azure.storage.blob.models.BlobRetentionPolicy;
import com.azure.storage.blob.models.BlobServiceProperties;
import com.azure.storage.blob.models.BlobServiceStatistics;
import com.azure.storage.blob.models.CpkInfo;
@@ -38,6 +40,8 @@

import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

@@ -361,6 +365,8 @@ Mono<Response<BlobServiceProperties>> getPropertiesWithResponse(Context context)
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties">Azure Docs</a>.
* Note that setting the default service version has no effect when using this client because this client explicitly
* sets the version header on each request, overriding the default.
* <p>This method checks to ensure the properties being sent follow the specifications indicated in the Azure Docs.
* If CORS policies are set, CORS parameters that are not set default to the empty string.</p>
*
* <p><strong>Code Samples</strong></p>
*
@@ -382,6 +388,8 @@ public Mono<Void> setProperties(BlobServiceProperties properties) {
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties">Azure Docs</a>.
* Note that setting the default service version has no effect when using this client because this client explicitly
* sets the version header on each request, overriding the default.
* <p>This method checks to ensure the properties being sent follow the specifications indicated in the Azure Docs.
* If CORS policies are set, CORS parameters that are not set default to the empty string.</p>
* <p><strong>Code Samples</strong></p>
*
* {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.setPropertiesWithResponse#BlobServiceProperties}
@@ -399,10 +407,99 @@ public Mono<Response<Void>> setPropertiesWithResponse(BlobServiceProperties prop

Mono<Response<Void>> setPropertiesWithResponse(BlobServiceProperties properties, Context context) {
throwOnAnonymousAccess();
return this.azureBlobStorage.services().setPropertiesWithRestResponseAsync(properties, null, null, context)
BlobServiceProperties finalProperties = null;
if (properties != null) {
finalProperties = new BlobServiceProperties();

// Logging
finalProperties.setLogging(properties.getLogging());
if (finalProperties.getLogging() != null) {
StorageImplUtils.assertNotNull("Logging Version", finalProperties.getLogging().getVersion());
validateRetentionPolicy(finalProperties.getLogging().getRetentionPolicy(), "Logging Retention Policy");
}

// Hour Metrics
finalProperties.setHourMetrics(properties.getHourMetrics());
if (finalProperties.getHourMetrics() != null) {
StorageImplUtils.assertNotNull("HourMetrics Version", finalProperties.getHourMetrics().getVersion());
validateRetentionPolicy(finalProperties.getHourMetrics().getRetentionPolicy(), "HourMetrics Retention "
+ "Policy");
if (finalProperties.getHourMetrics().isEnabled()) {
StorageImplUtils.assertNotNull("HourMetrics IncludeApis",
finalProperties.getHourMetrics().isIncludeApis());
}
}

// Minute Metrics
finalProperties.setMinuteMetrics(properties.getMinuteMetrics());
if (finalProperties.getMinuteMetrics() != null) {
StorageImplUtils.assertNotNull("MinuteMetrics Version",
finalProperties.getMinuteMetrics().getVersion());
validateRetentionPolicy(finalProperties.getMinuteMetrics().getRetentionPolicy(), "MinuteMetrics "
+ "Retention Policy");
if (finalProperties.getMinuteMetrics().isEnabled()) {
StorageImplUtils.assertNotNull("MinuteMetrics IncludeApis",
finalProperties.getHourMetrics().isIncludeApis());
}
}

// CORS
if (properties.getCors() != null) {
List<BlobCorsRule> corsRules = new ArrayList<>();
for (BlobCorsRule rule : properties.getCors()) {
corsRules.add(validatedCorsRule(rule));
}
finalProperties.setCors(corsRules);
}

// Default Service Version
finalProperties.setDefaultServiceVersion(properties.getDefaultServiceVersion());

// Delete Retention Policy
finalProperties.setDeleteRetentionPolicy(properties.getDeleteRetentionPolicy());
validateRetentionPolicy(finalProperties.getDeleteRetentionPolicy(), "DeleteRetentionPolicy Days");

// Static Website
finalProperties.setStaticWebsite(properties.getStaticWebsite());

}

return this.azureBlobStorage.services().setPropertiesWithRestResponseAsync(finalProperties, null, null, context)
.map(response -> new SimpleResponse<>(response, null));
}

/**
* Sets any null fields to "" since the service requires all Cors rules to be set if some are set.
* @param originalRule {@link BlobCorsRule}
* @return The validated {@link BlobCorsRule}
*/
private BlobCorsRule validatedCorsRule(BlobCorsRule originalRule) {
if (originalRule == null) {
return null;
}
BlobCorsRule validRule = new BlobCorsRule();
validRule.setAllowedHeaders(StorageImplUtils.emptyIfNull(originalRule.getAllowedHeaders()));
validRule.setAllowedMethods(StorageImplUtils.emptyIfNull(originalRule.getAllowedMethods()));
validRule.setAllowedOrigins(StorageImplUtils.emptyIfNull(originalRule.getAllowedOrigins()));
validRule.setExposedHeaders(StorageImplUtils.emptyIfNull(originalRule.getExposedHeaders()));
validRule.setMaxAgeInSeconds(originalRule.getMaxAgeInSeconds());
return validRule;
}

/**
* Validates a {@link BlobRetentionPolicy} according to service specs for set properties.
* @param retentionPolicy {@link BlobRetentionPolicy}
* @param policyName The name of the variable for errors.
*/
private void validateRetentionPolicy(BlobRetentionPolicy retentionPolicy, String policyName) {
if (retentionPolicy == null) {
return;
}
if (retentionPolicy.isEnabled()) {
StorageImplUtils.assertInBounds(policyName, retentionPolicy.getDays(), 1, 365);
}
}

/**
* Gets a user delegation key for use with this account's blob storage. Note: This method call is only valid when
* using {@link TokenCredential} in this object's {@link HttpPipeline}.
Original file line number Diff line number Diff line change
@@ -231,6 +231,8 @@ public Response<BlobServiceProperties> getPropertiesWithResponse(Duration timeou
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties">Azure Docs</a>.
* Note that setting the default service version has no effect when using this client because this client explicitly
* sets the version header on each request, overriding the default.
* <p>This method checks to ensure the properties being sent follow the specifications indicated in the Azure Docs.
* If CORS policies are set, CORS parameters that are not set default to the empty string.</p>
*
* <p><strong>Code Samples</strong></p>
*
@@ -247,6 +249,8 @@ public void setProperties(BlobServiceProperties properties) {
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties">Azure Docs</a>.
* Note that setting the default service version has no effect when using this client because this client explicitly
* sets the version header on each request, overriding the default.
* <p>This method checks to ensure the properties being sent follow the specifications indicated in the Azure Docs.
* If CORS policies are set, CORS parameters that are not set default to the empty string.</p>
*
* <p><strong>Code Samples</strong></p>
*
Original file line number Diff line number Diff line change
@@ -290,6 +290,23 @@ class ServiceAPITest extends APISpec {
primaryBlobServiceClient.setPropertiesWithResponse(sentProperties, null, null).getStatusCode() == 202
}

def "Set props cors check"() {
setup:
def serviceProperties = primaryBlobServiceClient.getProperties()

// Some properties are not set and this test validates that they are not null when sent to the service
def rule = new BlobCorsRule()
rule.setAllowedOrigins("microsoft.com")
rule.setMaxAgeInSeconds(60)
rule.setAllowedMethods("GET")
rule.setAllowedHeaders("x-ms-version")

serviceProperties.setCors(Collections.singletonList(rule))

expect:
primaryBlobServiceClient.setPropertiesWithResponse(serviceProperties, null, null).getStatusCode() == 202
}

def "Set props error"() {
when:
getServiceClient(primaryCredential, "https://error.blob.core.windows.net")
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
"Uri" : "https://gaprastg71.blob.core.windows.net/jtcsetpropscorscheck0serviceapitestsetpropscorscheckd2d100161?restype=container",
"Headers" : {
"x-ms-version" : "2019-02-02",
"User-Agent" : "azsdk-java-azure-storage-blob/12.3.0-beta.1 (11.0.4; Windows 10 10.0)",
"x-ms-client-request-id" : "5d549ef1-ca87-4776-be9f-3b73920314a6"
},
"Response" : {
"x-ms-version" : "2019-02-02",
"Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
"ETag" : "0x8D799E4A7F4D6C3",
"Last-Modified" : "Wed, 15 Jan 2020 17:59:24 GMT",
"retry-after" : "0",
"Content-Length" : "0",
"StatusCode" : "201",
"x-ms-request-id" : "67fe4ef4-f01e-002d-44cd-cb2148000000",
"Date" : "Wed, 15 Jan 2020 17:59:23 GMT",
"x-ms-client-request-id" : "5d549ef1-ca87-4776-be9f-3b73920314a6"
},
"Exception" : null
}, {
"Method" : "PUT",
"Uri" : "https://gaprastg71.blob.core.windows.net?restype=service&comp=properties",
"Headers" : {
"x-ms-version" : "2019-02-02",
"User-Agent" : "azsdk-java-azure-storage-blob/12.3.0-beta.1 (11.0.4; Windows 10 10.0)",
"x-ms-client-request-id" : "ccf3bbf7-7dfa-463f-b195-500ae58eaf72",
"Content-Type" : "application/xml; charset=utf-8"
},
"Response" : {
"x-ms-version" : "2019-02-02",
"Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
"retry-after" : "0",
"Content-Length" : "0",
"StatusCode" : "202",
"x-ms-request-id" : "67fe4ef7-f01e-002d-45cd-cb2148000000",
"Date" : "Wed, 15 Jan 2020 17:59:25 GMT",
"x-ms-client-request-id" : "ccf3bbf7-7dfa-463f-b195-500ae58eaf72"
},
"Exception" : null
}, {
"Method" : "GET",
"Uri" : "https://gaprastg71.blob.core.windows.net?restype=service&comp=properties",
"Headers" : {
"x-ms-version" : "2019-02-02",
"User-Agent" : "azsdk-java-azure-storage-blob/12.3.0-beta.1 (11.0.4; Windows 10 10.0)",
"x-ms-client-request-id" : "ced55d39-dd7a-472c-8ec2-10a9a29fc758"
},
"Response" : {
"Transfer-Encoding" : "chunked",
"x-ms-version" : "2019-02-02",
"Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
"Vary" : "Origin",
"retry-after" : "0",
"StatusCode" : "200",
"x-ms-request-id" : "67fe4f0d-f01e-002d-4dcd-cb2148000000",
"Body" : "<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors><CorsRule><AllowedMethods>GET</AllowedMethods><AllowedOrigins>microsoft.com</AllowedOrigins><AllowedHeaders>x-ms-version</AllowedHeaders><ExposedHeaders /><MaxAgeInSeconds>60</MaxAgeInSeconds></CorsRule></Cors><DeleteRetentionPolicy><Enabled>false</Enabled></DeleteRetentionPolicy><StaticWebsite><Enabled>false</Enabled></StaticWebsite><DefaultServiceVersion>2018-03-28</DefaultServiceVersion></StorageServiceProperties>",
"Date" : "Wed, 15 Jan 2020 17:59:25 GMT",
"x-ms-client-request-id" : "ced55d39-dd7a-472c-8ec2-10a9a29fc758",
"Content-Type" : "application/xml"
},
"Exception" : null
}, {
"Method" : "PUT",
"Uri" : "https://gaprastg71.blob.core.windows.net?restype=service&comp=properties",
"Headers" : {
"x-ms-version" : "2019-02-02",
"User-Agent" : "azsdk-java-azure-storage-blob/12.3.0-beta.1 (11.0.4; Windows 10 10.0)",
"x-ms-client-request-id" : "e0f37959-0eca-4653-b724-f88b30984501",
"Content-Type" : "application/xml; charset=utf-8"
},
"Response" : {
"x-ms-version" : "2019-02-02",
"Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
"retry-after" : "0",
"Content-Length" : "0",
"StatusCode" : "202",
"x-ms-request-id" : "67fe4f10-f01e-002d-4fcd-cb2148000000",
"Date" : "Wed, 15 Jan 2020 17:59:25 GMT",
"x-ms-client-request-id" : "e0f37959-0eca-4653-b724-f88b30984501"
},
"Exception" : null
}, {
"Method" : "PUT",
"Uri" : "https://gaprastg71.blob.core.windows.net?restype=service&comp=properties",
"Headers" : {
"x-ms-version" : "2019-02-02",
"User-Agent" : "azsdk-java-azure-storage-blob/12.3.0-beta.1 (11.0.4; Windows 10 10.0)",
"x-ms-client-request-id" : "4ec131b7-b87e-454d-8341-e6cc0f870a61",
"Content-Type" : "application/xml; charset=utf-8"
},
"Response" : {
"x-ms-version" : "2019-02-02",
"Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
"retry-after" : "0",
"Content-Length" : "0",
"StatusCode" : "202",
"x-ms-request-id" : "67fe4f12-f01e-002d-50cd-cb2148000000",
"Date" : "Wed, 15 Jan 2020 17:59:25 GMT",
"x-ms-client-request-id" : "4ec131b7-b87e-454d-8341-e6cc0f870a61"
},
"Exception" : null
}, {
"Method" : "GET",
"Uri" : "https://gaprastg71.blob.core.windows.net?prefix=jtcsetpropscorscheck&comp=list",
"Headers" : {
"x-ms-version" : "2019-02-02",
"User-Agent" : "azsdk-java-azure-storage-blob/12.3.0-beta.1 (11.0.4; Windows 10 10.0)",
"x-ms-client-request-id" : "916fd24d-7ccd-4225-a5e2-d4167b3bd8d6"
},
"Response" : {
"Transfer-Encoding" : "chunked",
"x-ms-version" : "2019-02-02",
"Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
"Vary" : "Origin",
"retry-after" : "0",
"StatusCode" : "200",
"x-ms-request-id" : "67fe4f13-f01e-002d-51cd-cb2148000000",
"Body" : "<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults ServiceEndpoint=\"https://gaprastg71.blob.core.windows.net/\"><Prefix>jtcsetpropscorscheck</Prefix><Containers><Container><Name>jtcsetpropscorscheck0serviceapitestsetpropscorscheckd2d100161</Name><Properties><Last-Modified>Wed, 15 Jan 2020 17:59:24 GMT</Last-Modified><Etag>\"0x8D799E4A7F4D6C3\"</Etag><LeaseStatus>unlocked</LeaseStatus><LeaseState>available</LeaseState><DefaultEncryptionScope>$account-encryption-key</DefaultEncryptionScope><DenyEncryptionScopeOverride>false</DenyEncryptionScopeOverride><HasImmutabilityPolicy>false</HasImmutabilityPolicy><HasLegalHold>false</HasLegalHold></Properties></Container></Containers><NextMarker /></EnumerationResults>",
"Date" : "Wed, 15 Jan 2020 17:59:25 GMT",
"x-ms-client-request-id" : "916fd24d-7ccd-4225-a5e2-d4167b3bd8d6",
"Content-Type" : "application/xml"
},
"Exception" : null
}, {
"Method" : "DELETE",
"Uri" : "https://gaprastg71.blob.core.windows.net/jtcsetpropscorscheck0serviceapitestsetpropscorscheckd2d100161?restype=container",
"Headers" : {
"x-ms-version" : "2019-02-02",
"User-Agent" : "azsdk-java-azure-storage-blob/12.3.0-beta.1 (11.0.4; Windows 10 10.0)",
"x-ms-client-request-id" : "a0d38f04-3502-44b0-a0de-5ff7662e7268"
},
"Response" : {
"x-ms-version" : "2019-02-02",
"Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
"retry-after" : "0",
"Content-Length" : "0",
"StatusCode" : "202",
"x-ms-request-id" : "67fe4f14-f01e-002d-52cd-cb2148000000",
"Date" : "Wed, 15 Jan 2020 17:59:26 GMT",
"x-ms-client-request-id" : "a0d38f04-3502-44b0-a0de-5ff7662e7268"
},
"Exception" : null
} ],
"variables" : [ "jtcsetpropscorscheck0serviceapitestsetpropscorscheckd2d100161" ]
}
Original file line number Diff line number Diff line change
@@ -251,4 +251,13 @@ public static String getAccountName(URL url) {
}
return accountName;
}

/**
* Returns an empty string if value is {@code null}, otherwise returns value
* @param value The value to check and return.
* @return The value or empty string.
*/
public static String emptyIfNull(String value) {
return value == null ? "" : value;
}
}