diff --git a/spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java b/spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java index cc7aa88f75..c2249c4fa8 100644 --- a/spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java +++ b/spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,9 +41,9 @@ import org.springframework.util.CollectionUtils; * The default implementation of {@link CorsProcessor}, as defined by the * CORS W3C recommendation. * - *
Note that when input {@link CorsConfiguration} is {@code null}, this + *
Note that when the supplied {@link CorsConfiguration} is {@code null}, this * implementation does not reject simple or actual requests outright but simply - * avoid adding CORS headers to the response. CORS processing is also skipped + * avoids adding CORS headers to the response. CORS processing is also skipped * if the response already contains CORS headers. * * @author Sebastien Deleuze diff --git a/spring-web/src/main/java/org/springframework/web/cors/reactive/DefaultCorsProcessor.java b/spring-web/src/main/java/org/springframework/web/cors/reactive/DefaultCorsProcessor.java index a0066367a4..cd736034a3 100644 --- a/spring-web/src/main/java/org/springframework/web/cors/reactive/DefaultCorsProcessor.java +++ b/spring-web/src/main/java/org/springframework/web/cors/reactive/DefaultCorsProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,6 @@ package org.springframework.web.cors.reactive; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.apache.commons.logging.Log; @@ -37,9 +36,9 @@ import org.springframework.web.server.ServerWebExchange; * The default implementation of {@link CorsProcessor}, * as defined by the CORS W3C recommendation. * - *
Note that when input {@link CorsConfiguration} is {@code null}, this + *
Note that when the supplied {@link CorsConfiguration} is {@code null}, this
* implementation does not reject simple or actual requests outright but simply
- * avoid adding CORS headers to the response. CORS processing is also skipped
+ * avoids adding CORS headers to the response. CORS processing is also skipped
* if the response already contains CORS headers.
*
* @author Sebastien Deleuze
@@ -50,13 +49,12 @@ public class DefaultCorsProcessor implements CorsProcessor {
private static final Log logger = LogFactory.getLog(DefaultCorsProcessor.class);
- private static final List