From e0985331c039a4474d9e9f371de270fb5f9efd91 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Tue, 31 Oct 2023 09:56:35 +0100 Subject: [PATCH] Polish ReactiveCloudFoundrySecurityService --- .../reactive/ReactiveCloudFoundrySecurityService.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java index 4add4c0943..d75725e68d 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java @@ -53,8 +53,6 @@ class ReactiveCloudFoundrySecurityService { private final String cloudControllerUrl; - private Mono uaaUrl; - ReactiveCloudFoundrySecurityService(WebClient.Builder webClientBuilder, String cloudControllerUrl, boolean skipSslValidation) { Assert.notNull(webClientBuilder, "WebClient must not be null"); @@ -149,7 +147,7 @@ class ReactiveCloudFoundrySecurityService { * @return the UAA url Mono */ Mono getUaaUrl() { - this.uaaUrl = this.webClient.get() + return this.webClient.get() .uri(this.cloudControllerUrl + "/info") .retrieve() .bodyToMono(Map.class) @@ -157,7 +155,6 @@ class ReactiveCloudFoundrySecurityService { .cache() .onErrorMap((ex) -> new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE, "Unable to fetch token keys from UAA.")); - return this.uaaUrl; } }