From eb753679340847ffdcd90958254fb6e8d78c1fe7 Mon Sep 17 00:00:00 2001 From: Sebastien Deleuze Date: Mon, 1 Apr 2019 17:43:20 +0200 Subject: [PATCH] Remove deprecated AbstractHandlerMapping#getCorsConfigurations Closes gh-22719 --- .../servlet/handler/AbstractHandlerMapping.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java index d84e9eb19e..ef81b9e649 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java @@ -230,22 +230,6 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport this.corsConfigurationSource = corsConfigurationSource; } - /** - * Get the "global" CORS configurations. - * @deprecated as of 5.1 since it is now possible to set a {@link CorsConfigurationSource} which is not a - * {@link UrlBasedCorsConfigurationSource}. Expected to be removed in 5.2. - */ - @Deprecated - public Map getCorsConfigurations() { - if (this.corsConfigurationSource instanceof UrlBasedCorsConfigurationSource) { - return ((UrlBasedCorsConfigurationSource)this.corsConfigurationSource).getCorsConfigurations(); - } - else { - throw new IllegalStateException("No CORS configurations available when the source " + - "is not an UrlBasedCorsConfigurationSource"); - } - } - /** * Configure a custom {@link CorsProcessor} to use to apply the matched * {@link CorsConfiguration} for a request.