From 11b9862064216be860a014e03981a58293d1cb14 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Fri, 21 Feb 2020 17:38:43 +0100 Subject: [PATCH] Revert "Clear ProducesRequestCondition cache attribute" Closes gh-20292 --- .../AbstractWebFluxEndpointHandlerMapping.java | 6 ------ .../servlet/AbstractWebMvcEndpointHandlerMapping.java | 10 ---------- 2 files changed, 16 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/AbstractWebFluxEndpointHandlerMapping.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/AbstractWebFluxEndpointHandlerMapping.java index 9ae97add14..a9aaff3664 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/AbstractWebFluxEndpointHandlerMapping.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/AbstractWebFluxEndpointHandlerMapping.java @@ -198,12 +198,6 @@ public abstract class AbstractWebFluxEndpointHandlerMapping extends RequestMappi return this.corsConfiguration; } - @Override - public Mono getHandlerInternal(ServerWebExchange exchange) { - return super.getHandlerInternal(exchange) - .doOnTerminate(() -> ProducesRequestCondition.clearMediaTypesAttribute(exchange)); - } - @Override protected boolean isHandler(Class beanType) { return false; diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java index d2e1fca8de..0b7f997051 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java @@ -231,16 +231,6 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin return this.corsConfiguration; } - @Override - protected HandlerMethod getHandlerInternal(HttpServletRequest request) throws Exception { - try { - return super.getHandlerInternal(request); - } - finally { - ProducesRequestCondition.clearMediaTypesAttribute(request); - } - } - @Override protected boolean isHandler(Class beanType) { return false;