Skip to content

Commit 0ba49df

Browse files
committed
spotless
1 parent eab1581 commit 0ba49df

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -929,9 +929,9 @@ private Mono<Boolean> checkIMDSAvailable(String endpoint) {
929929
HttpRequest request = new HttpRequest(HttpMethod.GET, url);
930930

931931
return getPipeline().send(request)
932-
.onErrorMap(t -> new CredentialUnavailableException("ManagedIdentityCredential authentication unavailable. "
933-
+ "Connection to IMDS endpoint cannot be established, " + t.getMessage() + ".", t))
934-
.flatMap(response -> Mono.just(true));
932+
.onErrorMap(t -> new CredentialUnavailableException("ManagedIdentityCredential authentication unavailable. "
933+
+ "Connection to IMDS endpoint cannot be established, " + t.getMessage() + ".", t))
934+
.flatMap(response -> Mono.just(true));
935935
}
936936

937937
private static Proxy proxyOptionsToJavaNetProxy(ProxyOptions options) {

sdk/identity/azure-identity/src/test/java/com/azure/identity/ManagedIdentityCredentialTest.java

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,35 +43,34 @@ public void testVirtualMachineMSICredentialConfigurations() {
4343
}
4444

4545
@ParameterizedTest
46-
@ValueSource(booleans = {true, false})
46+
@ValueSource(booleans = { true, false })
4747
public void testInvalidJsonResponse(boolean isChained) {
4848
HttpClient client = TestUtils.getMockHttpClient(
49-
getMockResponse(400, "{\"error\":\"invalid_request\",\"error_description\":\"Required metadata header not specified\"}"),
50-
getMockResponse( 200, "invalid json")
51-
);
49+
getMockResponse(400,
50+
"{\"error\":\"invalid_request\",\"error_description\":\"Required metadata header not specified\"}"),
51+
getMockResponse(200, "invalid json"));
5252

5353
String endpoint = "http://localhost";
5454
String secret = "secret";
5555

5656
Configuration configuration
57-
= TestUtils.createTestConfiguration(new TestConfigurationSource().put("MSI_ENDPOINT", endpoint) // This must stay to signal we are in an app service context
57+
= TestUtils.createTestConfiguration(new TestConfigurationSource().put("MSI_ENDPOINT", endpoint) // This must stay to signal we are in an app service context
5858
.put("MSI_SECRET", secret)
5959
.put("IDENTITY_ENDPOINT", endpoint)
6060
.put("IDENTITY_HEADER", secret));
6161

62-
IdentityClientOptions options = new IdentityClientOptions()
63-
.setChained(isChained)
64-
.setHttpClient(client)
65-
.setConfiguration(configuration);
62+
IdentityClientOptions options
63+
= new IdentityClientOptions().setChained(isChained).setHttpClient(client).setConfiguration(configuration);
6664
ManagedIdentityCredential cred = new ManagedIdentityCredential("clientId", null, null, options);
6765
StepVerifier.create(cred.getToken(new TokenRequestContext().addScopes("https://management.azure.com")))
68-
.expectErrorMatches(t -> {
69-
if (isChained) {
70-
return t instanceof CredentialUnavailableException;
71-
} else {
72-
return t instanceof ClientAuthenticationException;
73-
}
74-
}).verify();
66+
.expectErrorMatches(t -> {
67+
if (isChained) {
68+
return t instanceof CredentialUnavailableException;
69+
} else {
70+
return t instanceof ClientAuthenticationException;
71+
}
72+
})
73+
.verify();
7574

7675
}
7776

0 commit comments

Comments
 (0)