diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/credentials/BasicAuthenticationCredential.java b/sdk/core/azure-core/src/main/java/com/azure/core/credentials/BasicAuthenticationCredential.java index d629d805beb3..06c08bd391d0 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/credentials/BasicAuthenticationCredential.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/credentials/BasicAuthenticationCredential.java @@ -18,7 +18,7 @@ public class BasicAuthenticationCredential implements TokenCredential { /** * Basic auth user name. */ - private final String userName; + private final String username; /** * Basic auth password. @@ -28,11 +28,11 @@ public class BasicAuthenticationCredential implements TokenCredential { /** * Creates a basic authentication credential. * - * @param userName basic auth user name + * @param username basic auth user name * @param password basic auth password */ - public BasicAuthenticationCredential(String userName, String password) { - this.userName = userName; + public BasicAuthenticationCredential(String username, String password) { + this.username = username; this.password = password; } @@ -41,7 +41,7 @@ public BasicAuthenticationCredential(String userName, String password) { */ @Override public Mono getToken(TokenRequest request) { - String credential = userName + ":" + password; + String credential = username + ":" + password; String encodedCredential; try { encodedCredential = Base64Util.encodeToString(credential.getBytes("UTF8")); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/credentials/SimpleTokenCache.java b/sdk/core/azure-core/src/main/java/com/azure/core/credentials/SimpleTokenCache.java index 53f5b9e2c778..aef8864d854b 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/credentials/SimpleTokenCache.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/credentials/SimpleTokenCache.java @@ -21,16 +21,16 @@ public class SimpleTokenCache { private AccessToken cache; private final ReplayProcessor emitterProcessor = ReplayProcessor.create(1); private final FluxSink sink = emitterProcessor.sink(OverflowStrategy.BUFFER); - private final Supplier> getNew; + private final Supplier> tokenSupplier; /** * Creates an instance of RefreshableTokenCredential with default scheme "Bearer". * - * @param getNew a method to get a new token + * @param tokenSupplier a method to get a new token */ - public SimpleTokenCache(Supplier> getNew) { + public SimpleTokenCache(Supplier> tokenSupplier) { this.wip = new AtomicBoolean(false); - this.getNew = getNew; + this.tokenSupplier = tokenSupplier; } /** @@ -43,7 +43,7 @@ public Mono getToken() { } return Mono.defer(() -> { if (!wip.getAndSet(true)) { - return getNew.get().doOnNext(ac -> cache = ac) + return tokenSupplier.get().doOnNext(ac -> cache = ac) .doOnNext(sink::next) .doOnError(sink::error) .doOnTerminate(() -> wip.set(false)); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogDetailLevel.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogDetailLevel.java index 99a7712d9db7..d7b8df590693 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogDetailLevel.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogDetailLevel.java @@ -37,7 +37,7 @@ public enum HttpLogDetailLevel { /** * @return a value indicating whether a request's URL should be logged. */ - public boolean shouldLogURL() { + public boolean shouldLogUrl() { return this != NONE; } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java index f8df955bca2f..89b6c78e50cf 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java @@ -69,7 +69,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN } private Mono logRequest(final ClientLogger logger, final HttpRequest request) { - if (detailLevel.shouldLogURL()) { + if (detailLevel.shouldLogUrl()) { logger.info("--> {} {}", request.getHttpMethod(), request.getUrl()); } @@ -129,7 +129,7 @@ private Function> logResponseDelegate(final Cli } // HttpResponseStatus responseStatus = HttpResponseStatus.valueOf(response.statusCode()); - if (detailLevel.shouldLogURL()) { + if (detailLevel.shouldLogUrl()) { logger.info("<-- {} {} ({} ms, {} body)", response.getStatusCode(), url, tookMs, bodySize); }