Skip to content

Commit 4862b9f

Browse files
committed
Fixed thread safety and sensitive information review comment
1 parent 64b4807 commit 4862b9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/identity/azure-identity/src/main/java/com/azure/identity/WorkloadIdentityCredential.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class WorkloadIdentityCredential implements TokenCredential {
7373
ValidationUtil.validateTenantIdCharacterRange(tenantId, LOGGER);
7474

7575
Configuration configuration = identityClientOptions.getConfiguration() == null
76-
? Configuration.getGlobalConfiguration()
76+
? Configuration.getGlobalConfiguration().clone()
7777
: identityClientOptions.getConfiguration();
7878

7979
String tenantIdInput
@@ -149,7 +149,7 @@ private String readFederatedTokenFromFile(String filePath) {
149149
try {
150150
return Files.readString(Paths.get(filePath), StandardCharsets.UTF_8).trim();
151151
} catch (IOException e) {
152-
throw LOGGER.logExceptionAsError(new RuntimeException("Failed to read federated token from file: " + filePath, e));
152+
throw LOGGER.logExceptionAsError(new RuntimeException("Failed to read federated token from file. ", e));
153153
}
154154
}
155155
}

0 commit comments

Comments
 (0)