From 31c6965c7fef6469b71e0814c4a3892813c98ce7 Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Mon, 11 Jul 2022 23:15:26 +0200 Subject: [PATCH 1/2] Fix and improve Javadoc in spring-webflux Closes gh-28790 --- .../springframework/web/reactive/HandlerAdapter.java | 2 +- .../web/reactive/HandlerResultHandler.java | 2 +- .../accept/ParameterContentTypeResolver.java | 2 +- .../reactive/config/WebFluxConfigurationSupport.java | 12 ++++++------ .../web/reactive/config/WebFluxConfigurer.java | 2 +- .../web/reactive/function/BodyExtractors.java | 2 +- .../function/client/WebClientResponseException.java | 2 +- .../reactive/function/server/RequestPredicates.java | 4 ++-- .../reactive/function/server/RouterFunctions.java | 4 ++-- .../web/reactive/function/server/ServerRequest.java | 2 +- .../web/reactive/handler/AbstractHandlerMapping.java | 6 +++--- .../reactive/handler/AbstractUrlHandlerMapping.java | 2 +- .../reactive/handler/SimpleUrlHandlerMapping.java | 2 +- .../reactive/resource/ContentVersionStrategy.java | 2 +- .../web/reactive/resource/PathResourceResolver.java | 4 ++-- .../reactive/resource/VersionResourceResolver.java | 2 +- .../reactive/result/HandlerResultHandlerSupport.java | 2 +- .../result/condition/AbstractRequestCondition.java | 2 +- .../result/method/AbstractHandlerMethodMapping.java | 2 +- .../result/method/InvocableHandlerMethod.java | 2 +- .../method/RequestMappingInfoHandlerMapping.java | 2 +- .../result/method/SyncInvocableHandlerMethod.java | 2 +- .../AbstractMessageReaderArgumentResolver.java | 2 +- .../AbstractNamedValueSyncArgumentResolver.java | 2 +- .../MatrixVariableMethodArgumentResolver.java | 2 +- .../annotation/ModelMethodArgumentResolver.java | 2 +- .../web/reactive/result/view/RedirectView.java | 2 +- .../reactive/result/view/UrlBasedViewResolver.java | 2 +- .../web/reactive/result/view/View.java | 2 +- .../adapter/AbstractListenerWebSocketSession.java | 2 +- .../function/client/DefaultWebClientTests.java | 2 +- .../RequestMethodsRequestConditionTests.java | 2 +- ...uestMappingMessageConversionIntegrationTests.java | 2 +- .../socket/AbstractWebSocketIntegrationTests.java | 2 +- 34 files changed, 44 insertions(+), 44 deletions(-) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/HandlerAdapter.java b/spring-webflux/src/main/java/org/springframework/web/reactive/HandlerAdapter.java index c06ea1a67a2..7361b54d905 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/HandlerAdapter.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/HandlerAdapter.java @@ -35,7 +35,7 @@ public interface HandlerAdapter { /** * Whether this {@code HandlerAdapter} supports the given {@code handler}. * @param handler the handler object to check - * @return whether or not the handler is supported + * @return whether the handler is supported */ boolean supports(Object handler); diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/HandlerResultHandler.java b/spring-webflux/src/main/java/org/springframework/web/reactive/HandlerResultHandler.java index 8df3340a819..6badfaa6847 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/HandlerResultHandler.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/HandlerResultHandler.java @@ -32,7 +32,7 @@ public interface HandlerResultHandler { /** * Whether this handler supports the given {@link HandlerResult}. * @param result the result object to check - * @return whether or not this object can use the given result + * @return whether this object can use the given result */ boolean supports(HandlerResult result); diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/accept/ParameterContentTypeResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/accept/ParameterContentTypeResolver.java index d0ac319ec08..e8a6f6bad0a 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/accept/ParameterContentTypeResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/accept/ParameterContentTypeResolver.java @@ -31,7 +31,7 @@ import org.springframework.web.server.NotAcceptableStatusException; import org.springframework.web.server.ServerWebExchange; /** - * Resolver that checks a query parameter and uses it to lookup a matching + * Resolver that checks a query parameter and uses it to look up a matching * MediaType. Lookup keys can be registered or as a fallback * {@link MediaTypeFactory} can be used to perform a lookup. * diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurationSupport.java b/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurationSupport.java index 828ac8aa088..02da8c0dd28 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurationSupport.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurationSupport.java @@ -155,7 +155,7 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware { } /** - * Override to plug a sub-class of {@link RequestMappingHandlerMapping}. + * Override to plug a subclass of {@link RequestMappingHandlerMapping}. */ protected RequestMappingHandlerMapping createRequestMappingHandlerMapping() { return new RequestMappingHandlerMapping(); @@ -176,7 +176,7 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware { /** * Callback for building the global CORS configuration. This method is final. - * Use {@link #addCorsMappings(CorsRegistry)} to customize the CORS conifg. + * Use {@link #addCorsMappings(CorsRegistry)} to customize the CORS config. */ protected final Map getCorsConfigurations() { if (this.corsConfigurations == null) { @@ -188,7 +188,7 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware { } /** - * Override this method to configure cross origin requests processing. + * Override this method to configure cross-origin requests processing. * @see CorsRegistry */ protected void addCorsMappings(CorsRegistry registry) { @@ -222,7 +222,7 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware { } /** - * Override to plug a sub-class of {@link RouterFunctionMapping}. + * Override to plug a subclass of {@link RouterFunctionMapping}. */ protected RouterFunctionMapping createRouterFunctionMapping() { return new RouterFunctionMapping(); @@ -285,7 +285,7 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware { } /** - * Override to plug a sub-class of {@link RequestMappingHandlerAdapter}. + * Override to plug a subclass of {@link RequestMappingHandlerAdapter}. */ protected RequestMappingHandlerAdapter createRequestMappingHandlerAdapter() { return new RequestMappingHandlerAdapter(); @@ -310,7 +310,7 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware { } /** - * Override to plug a sub-class of {@link LocaleContextResolver}. + * Override to plug a subclass of {@link LocaleContextResolver}. */ protected LocaleContextResolver createLocaleContextResolver() { return new AcceptHeaderLocaleContextResolver(); diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java b/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java index fc8c91ff717..b459b564cdb 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java @@ -54,7 +54,7 @@ public interface WebFluxConfigurer { } /** - * Configure "global" cross origin request processing. The configured CORS + * Configure "global" cross-origin request processing. The configured CORS * mappings apply to annotated controllers, functional endpoints, and static * resources. *

Annotated controllers can further declare more fine-grained config via diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java index f433ccdfb40..bc9c238c29a 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java @@ -224,7 +224,7 @@ public abstract class BodyExtractors { Flux result; if (message.getHeaders().getContentType() == null) { - // Maybe it's okay there is no content type, if there is no content.. + // Maybe it's okay there is no content type, if there is no content. result = message.getBody().map(buffer -> { DataBufferUtils.release(buffer); throw ex; diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java index ab211917b5f..a3d1bb94a1c 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java @@ -414,7 +414,7 @@ public class WebClientResponseException extends WebClientException { } /** - * {@link WebClientResponseException} for status HTTP HTTP 502 Bad Gateway. + * {@link WebClientResponseException} for HTTP status 502 Bad Gateway. * @since 5.1 */ @SuppressWarnings("serial") diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java index d2c68f6760f..005ca67b272 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java @@ -336,14 +336,14 @@ public abstract class RequestPredicates { void method(Set methods); /** - * Receive notification of an path predicate. + * Receive notification of a path predicate. * @param pattern the path pattern that makes up the predicate * @see RequestPredicates#path(String) */ void path(String pattern); /** - * Receive notification of an path extension predicate. + * Receive notification of a path extension predicate. * @param extension the path extension that makes up the predicate * @see RequestPredicates#pathExtension(String) */ diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunctions.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunctions.java index 739fc17a1c3..6a900d5052d 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunctions.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunctions.java @@ -205,7 +205,7 @@ public abstract class RouterFunctions { * for additional filter and exception handler registration through * {@link WebHttpHandlerBuilder}. * @param routerFunction the router function to convert - * @return an http handler that handles HTTP request using the given router function + * @return an HTTP handler that handles HTTP request using the given router function */ public static HttpHandler toHttpHandler(RouterFunction routerFunction) { return toHttpHandler(routerFunction, HandlerStrategies.withDefaults()); @@ -225,7 +225,7 @@ public abstract class RouterFunctions { * * @param routerFunction the router function to convert * @param strategies the strategies to use - * @return an http handler that handles HTTP request using the given router function + * @return an HTTP handler that handles HTTP request using the given router function */ public static HttpHandler toHttpHandler(RouterFunction routerFunction, HandlerStrategies strategies) { WebHandler webHandler = toWebHandler(routerFunction, strategies); diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java index 5b44e5a4564..95eec309dc7 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java @@ -319,7 +319,7 @@ public interface ServerRequest { * also with conditional POST/PUT/DELETE requests. *

Note: you can use either * this {@code #checkNotModified(Instant)} method; or - * {@link #checkNotModified(String)}. If you want enforce both + * {@link #checkNotModified(String)}. If you want to enforce both * a strong entity tag and a Last-Modified value, * as recommended by the HTTP specification, * then you should use {@link #checkNotModified(Instant, String)}. diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java b/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java index 9176b731aaa..2e368e86f0e 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java @@ -106,7 +106,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport /** * Return the {@link PathPatternParser} instance that is used for * {@link #setCorsConfigurations(Map) CORS configuration checks}. - * Sub-classes can also use this pattern parser for their own request + * Subclasses can also use this pattern parser for their own request * mapping purposes. */ public PathPatternParser getPathPatternParser() { @@ -114,7 +114,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport } /** - * Set the "global" CORS configurations based on URL patterns. By default the + * Set the "global" CORS configurations based on URL patterns. By default, the * first matching URL pattern is combined with handler-level CORS configuration if any. * @see #setCorsConfigurationSource(CorsConfigurationSource) */ @@ -131,7 +131,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport } /** - * Set the "global" CORS configuration source. By default the first matching URL + * Set the "global" CORS configuration source. By default, the first matching URL * pattern is combined with the CORS configuration for the handler, if any. * @since 5.1 * @see #setCorsConfigurations(Map) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractUrlHandlerMapping.java b/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractUrlHandlerMapping.java index abaf4cf86f9..b60c4999809 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractUrlHandlerMapping.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractUrlHandlerMapping.java @@ -78,7 +78,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping { /** * Return a read-only view of registered path patterns and handlers which may - * may be an actual handler instance or the bean name of lazily initialized + * be an actual handler instance or the bean name of lazily initialized * handler. */ public final Map getHandlerMap() { diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMapping.java b/spring-webflux/src/main/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMapping.java index 966b316455b..0044698acfa 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMapping.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMapping.java @@ -113,7 +113,7 @@ public class SimpleUrlHandlerMapping extends AbstractUrlHandlerMapping { } /** - * Allow Map access to the URL path mappings, with the option to add or + * Allow {@code Map} access to the URL path mappings, with the option to add or * override specific entries. *

Useful for specifying entries directly, for example via "urlMap[myKey]". * This is particularly useful for adding or overriding entries in child diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ContentVersionStrategy.java b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ContentVersionStrategy.java index 80fceb3edab..92aef05cc47 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ContentVersionStrategy.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/ContentVersionStrategy.java @@ -27,7 +27,7 @@ import org.springframework.util.DigestUtils; import org.springframework.util.StreamUtils; /** - * A {@code VersionStrategy} that calculates an Hex MD5 hashes from the content + * A {@code VersionStrategy} that calculates a Hex MD5 hash from the content * of the resource and appends it to the file name, e.g. * {@code "styles/main-e36d2e05253c6c7085a91522ce43a0b4.css"}. * diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/PathResourceResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/PathResourceResolver.java index 23d5eaaa55f..b8404e03cd6 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/PathResourceResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/PathResourceResolver.java @@ -52,7 +52,7 @@ public class PathResourceResolver extends AbstractResourceResolver { /** - * By default when a Resource is found, the path of the resolved resource is + * By default, when a Resource is found, the path of the resolved resource is * compared to ensure it's under the input location where it was found. * However sometimes that may not be the case, e.g. when * {@link CssLinkResourceTransformer} @@ -146,7 +146,7 @@ public class PathResourceResolver extends AbstractResourceResolver { /** * Perform additional checks on a resolved resource beyond checking whether the - * resources exists and is readable. The default implementation also verifies + * resources exist and is readable. The default implementation also verifies * the resource is either under the location relative to which it was found or * is under one of the {@link #setAllowedLocations allowed locations}. * @param resource the resource to check diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java index 446ced9e24f..9d625b78e03 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java @@ -116,7 +116,7 @@ public class VersionResourceResolver extends AbstractResourceResolver { * in Java config). *

If not done already, variants of the given {@code pathPatterns}, prefixed with * the {@code version} will be also configured. For example, adding a {@code "/js/**"} path pattern - * will also cofigure automatically a {@code "/v1.0.0/js/**"} with {@code "v1.0.0"} the + * will also configure automatically a {@code "/v1.0.0/js/**"} with {@code "v1.0.0"} the * {@code version} String given as an argument. * @param version a version string * @param pathPatterns one or more resource URL path patterns, diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/HandlerResultHandlerSupport.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/HandlerResultHandlerSupport.java index 22bd3295287..2eda15e9e42 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/HandlerResultHandlerSupport.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/HandlerResultHandlerSupport.java @@ -88,7 +88,7 @@ public abstract class HandlerResultHandlerSupport implements Ordered { /** * Set the order for this result handler relative to others. *

By default set to {@link Ordered#LOWEST_PRECEDENCE}, however see - * Javadoc of sub-classes which may change this default. + * Javadoc of subclasses which may change this default. * @param order the order */ public void setOrder(int order) { diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/condition/AbstractRequestCondition.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/condition/AbstractRequestCondition.java index c008521a31b..0f873263907 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/condition/AbstractRequestCondition.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/condition/AbstractRequestCondition.java @@ -33,7 +33,7 @@ import org.springframework.lang.Nullable; public abstract class AbstractRequestCondition> implements RequestCondition { /** - * Indicates whether this condition is empty, i.e. whether or not it + * Indicates whether this condition is empty, i.e. whether it * contains any discrete items. * @return {@code true} if empty; {@code false} otherwise */ diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/AbstractHandlerMethodMapping.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/AbstractHandlerMethodMapping.java index 7d59209955d..4e531ad088d 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/AbstractHandlerMethodMapping.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/AbstractHandlerMethodMapping.java @@ -428,7 +428,7 @@ public abstract class AbstractHandlerMethodMapping extends AbstractHandlerMap * Provide the mapping for a handler method. A method for which no * mapping can be provided is not a handler method. * @param method the method to provide a mapping for - * @param handlerType the handler type, possibly a sub-type of the method's + * @param handlerType the handler type, possibly a subtype of the method's * declaring class * @return the mapping, or {@code null} if the method is not mapped */ diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java index b117a197aa8..e81709b4ac3 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java @@ -82,7 +82,7 @@ public class InvocableHandlerMethod extends HandlerMethod { /** - * Configure the argument resolvers to use to use for resolving method + * Configure the argument resolvers to use for resolving method * argument values against a {@code ServerWebExchange}. */ public void setArgumentResolvers(List resolvers) { diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java index fe4478e646e..4872d1f8090 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java @@ -225,7 +225,7 @@ public abstract class RequestMappingInfoHandlerMapping extends AbstractHandlerMe /** - * Whether there any partial matches. + * Whether there is any partial matches. */ public boolean isEmpty() { return this.partialMatches.isEmpty(); diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/SyncInvocableHandlerMethod.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/SyncInvocableHandlerMethod.java index 8822bf59dfb..f11d072b6bb 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/SyncInvocableHandlerMethod.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/SyncInvocableHandlerMethod.java @@ -56,7 +56,7 @@ public class SyncInvocableHandlerMethod extends HandlerMethod { /** - * Configure the argument resolvers to use to use for resolving method + * Configure the argument resolvers to use for resolving method * argument values against a {@code ServerWebExchange}. */ public void setArgumentResolvers(List resolvers) { diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractMessageReaderArgumentResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractMessageReaderArgumentResolver.java index 082bd5e88bc..5d7129b8fa2 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractMessageReaderArgumentResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractMessageReaderArgumentResolver.java @@ -200,7 +200,7 @@ public abstract class AbstractMessageReaderArgumentResolver extends HandlerMetho } } - // No compatible reader but body may be empty.. + // No compatible reader but body may be empty. HttpMethod method = request.getMethod(); if (contentType == null && method != null && SUPPORTED_METHODS.contains(method)) { diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractNamedValueSyncArgumentResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractNamedValueSyncArgumentResolver.java index 6b28373c265..1344d0bd3eb 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractNamedValueSyncArgumentResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractNamedValueSyncArgumentResolver.java @@ -28,7 +28,7 @@ import org.springframework.web.server.ServerWebExchange; /** * An extension of {@link AbstractNamedValueArgumentResolver} for named value - * resolvers that are synchronous and yet non-blocking. Sub-classes implement + * resolvers that are synchronous and yet non-blocking. Subclasses implement * the synchronous {@link #resolveNamedValue} to which the asynchronous * {@link #resolveName} delegates to by default. * diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/MatrixVariableMethodArgumentResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/MatrixVariableMethodArgumentResolver.java index f43e6a8af31..68af5bdbc6e 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/MatrixVariableMethodArgumentResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/MatrixVariableMethodArgumentResolver.java @@ -38,7 +38,7 @@ import org.springframework.web.server.ServerWebInputException; /** * Resolves arguments annotated with {@link MatrixVariable @MatrixVariable}. * - *

If the method parameter is of type {@link Map} it will by resolved by + *

If the method parameter is of type {@link Map} it will be resolved by * {@link MatrixVariableMapMethodArgumentResolver} instead unless the annotation * specifies a name in which case it is considered to be a single attribute of * type map (vs multiple attributes collected in a map). diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ModelMethodArgumentResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ModelMethodArgumentResolver.java index 9e4ca64ea73..d155f1bc618 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ModelMethodArgumentResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ModelMethodArgumentResolver.java @@ -30,7 +30,7 @@ import org.springframework.web.server.ServerWebExchange; * Resolver for a controller method argument of type {@link Model} that can * also be resolved as a {@link java.util.Map}. * - *

A Map return value can be interpreted in more than one ways depending + *

A Map return value can be interpreted in more than one way depending * on the presence of annotations like {@code @ModelAttribute} or * {@code @ResponseBody}. As of 5.2 this resolver returns false if a * parameter of type {@code Map} is also annotated. diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java index 65fbe78e3a2..b360b78baa7 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java @@ -300,7 +300,7 @@ public class RedirectView extends AbstractUrlBasedView { * This method returns {@code true} if the {@link #setHosts(String[])} * property is configured and the target URL has a host that does not match. * @param targetUrl the target redirect URL - * @return {@code true} the target URL has a remote host, {@code false} if it + * @return {@code true} the target URL has a remote host, {@code false} if * the URL does not have a host or the "host" property is not configured */ protected boolean isRemoteHost(String targetUrl) { diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/UrlBasedViewResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/UrlBasedViewResolver.java index fd46f78331f..98220c067d2 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/UrlBasedViewResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/UrlBasedViewResolver.java @@ -247,7 +247,7 @@ public class UrlBasedViewResolver extends ViewResolverSupport } /** - * Indicates whether or not this {@link ViewResolver} can handle the supplied + * Indicates whether this {@link ViewResolver} can handle the supplied * view name. If not, an empty result is returned. The default implementation * checks against the configured {@link #setViewNames view names}. * @param viewName the name of the view to retrieve diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/View.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/View.java index 4df2b194245..28cd9075dea 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/View.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/View.java @@ -64,7 +64,7 @@ public interface View { } /** - * Whether this View does rendering by performing a redirect. + * Whether this View does render by performing a redirect. */ default boolean isRedirectView() { return false; diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/adapter/AbstractListenerWebSocketSession.java b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/adapter/AbstractListenerWebSocketSession.java index efab5724027..8f8e530508a 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/adapter/AbstractListenerWebSocketSession.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/adapter/AbstractListenerWebSocketSession.java @@ -360,7 +360,7 @@ public abstract class AbstractListenerWebSocketSession extends AbstractWebSoc } /** - * Sub-classes can invoke this before sending a message (false) and + * Subclasses can invoke this before sending a message (false) and * after receiving the async send callback (true) effective translating * async completion callback into simple flow control. */ diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultWebClientTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultWebClientTests.java index a33a24c0164..2be51da9859 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultWebClientTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultWebClientTests.java @@ -288,7 +288,7 @@ public class DefaultWebClientTests { .defaultCookie("baz", "qux") .build(); - // Now, verify what each client has.. + // Now, verify what each client has. WebClient.Builder builder1 = client1.mutate(); builder1.filters(filters -> assertThat(filters.size()).isEqualTo(1)); diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMethodsRequestConditionTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMethodsRequestConditionTests.java index fbff5bc5d25..b2392b1cd7d 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMethodsRequestConditionTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMethodsRequestConditionTests.java @@ -44,7 +44,7 @@ import static org.springframework.web.bind.annotation.RequestMethod.PUT; */ public class RequestMethodsRequestConditionTests { - // TODO: custom method, CORS pre-flight (see @Disabledd) + // TODO: custom method, CORS pre-flight (see @Disabled) @Test public void getMatchingCondition() throws Exception { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java index 5472eca8f6b..da74868418c 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java @@ -168,7 +168,7 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq assertThat(responseEntity.getBody()).isNull(); // As we're on the same connection, the 2nd request proves server response handling - // did complete after the 1st request.. + // did complete after the 1st request. responseEntity = performGet("/person-response/mono-empty", JSON, Person.class); assertThat(responseEntity.getHeaders().getContentLength()).isEqualTo(0); assertThat(responseEntity.getBody()).isNull(); diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java index 494107f6c9d..8886a920661 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java @@ -67,7 +67,7 @@ import org.springframework.web.testfixture.http.server.reactive.bootstrap.Tomcat import org.springframework.web.testfixture.http.server.reactive.bootstrap.UndertowHttpServer; /** - * Base class for WebSocket integration tests. Sub-classes must implement + * Base class for WebSocket integration tests. Subclasses must implement * {@link #getWebConfigClass()} to return Spring config class with (server-side) * handler mappings to {@code WebSocketHandler}'s. * From 19704805fdab54f0fce637ea91ab977776de8612 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 12 Jul 2022 11:56:01 +0200 Subject: [PATCH 2/2] Polish contribution See gh-28790 --- .../web/reactive/resource/PathResourceResolver.java | 2 +- .../result/method/RequestMappingInfoHandlerMapping.java | 2 +- .../web/reactive/result/view/RedirectView.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/PathResourceResolver.java b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/PathResourceResolver.java index b8404e03cd6..3466a5e0ec7 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/PathResourceResolver.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/PathResourceResolver.java @@ -146,7 +146,7 @@ public class PathResourceResolver extends AbstractResourceResolver { /** * Perform additional checks on a resolved resource beyond checking whether the - * resources exist and is readable. The default implementation also verifies + * resource exists and is readable. The default implementation also verifies * the resource is either under the location relative to which it was found or * is under one of the {@link #setAllowedLocations allowed locations}. * @param resource the resource to check diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java index 4872d1f8090..a6a7cbf27dd 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java @@ -225,7 +225,7 @@ public abstract class RequestMappingInfoHandlerMapping extends AbstractHandlerMe /** - * Whether there is any partial matches. + * Whether there are any partial matches. */ public boolean isEmpty() { return this.partialMatches.isEmpty(); diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java index b360b78baa7..ed9b89c8fc8 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java @@ -297,10 +297,10 @@ public class RedirectView extends AbstractUrlBasedView { /** * Whether the given targetUrl has a host that is a "foreign" system in which * case {@link javax.servlet.http.HttpServletResponse#encodeRedirectURL} will not be applied. - * This method returns {@code true} if the {@link #setHosts(String[])} + *

This method returns {@code true} if the {@link #setHosts(String[])} * property is configured and the target URL has a host that does not match. * @param targetUrl the target redirect URL - * @return {@code true} the target URL has a remote host, {@code false} if + * @return {@code true} if the target URL has a remote host, {@code false} if * the URL does not have a host or the "host" property is not configured */ protected boolean isRemoteHost(String targetUrl) {