From eb9527a17038c6a44b4e1afa1fd82eb195baacb8 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Sun, 28 Jul 2019 13:15:32 +0200 Subject: [PATCH] Fix deprecation warnings in spring-boot-actuator See gh-17660 --- .../actuate/health/CompositeReactiveHealthIndicator.java | 5 +++-- .../metrics/web/reactive/server/MetricsWebFilter.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/CompositeReactiveHealthIndicator.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/CompositeReactiveHealthIndicator.java index 5fba0374ee2..548d8fec80f 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/CompositeReactiveHealthIndicator.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/CompositeReactiveHealthIndicator.java @@ -78,8 +78,9 @@ public class CompositeReactiveHealthIndicator implements ReactiveHealthIndicator @Override public Mono health() { - return Flux.fromIterable(this.registry.getAll().entrySet()).flatMap( - (entry) -> Mono.zip(Mono.just(entry.getKey()), entry.getValue().health().compose(this.timeoutCompose))) + return Flux.fromIterable(this.registry.getAll().entrySet()) + .flatMap((entry) -> Mono.zip(Mono.just(entry.getKey()), + entry.getValue().health().transformDeferred(this.timeoutCompose))) .collectMap(Tuple2::getT1, Tuple2::getT2).map(this.healthAggregator::aggregate); } diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilter.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilter.java index b70d337d5cc..faf21ebfb71 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilter.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilter.java @@ -85,7 +85,7 @@ public class MetricsWebFilter implements WebFilter { if (!this.autoTimer.isEnabled()) { return chain.filter(exchange); } - return chain.filter(exchange).compose((call) -> filter(exchange, call)); + return chain.filter(exchange).transformDeferred((call) -> filter(exchange, call)); } private Publisher filter(ServerWebExchange exchange, Mono call) {