From 5b1a84e39515d728b53edd84e49c59cb10225bd9 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 12 Jul 2022 10:38:53 +0200 Subject: [PATCH] Polish contribution See gh-28789 --- .../web/servlet/function/support/RouterFunctionMapping.java | 4 ++-- .../mvc/method/RequestMappingInfoHandlerMapping.java | 2 +- .../web/servlet/resource/PathResourceResolver.java | 4 ++-- .../web/servlet/resource/ResourceHttpRequestHandler.java | 2 +- .../org/springframework/web/servlet/view/RedirectView.java | 6 +++--- .../web/servlet/view/document/AbstractPdfStamperView.java | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/support/RouterFunctionMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/support/RouterFunctionMapping.java index a55b7372e3..cf56e33860 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/support/RouterFunctionMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/support/RouterFunctionMapping.java @@ -150,8 +150,8 @@ public class RouterFunctionMapping extends AbstractHandlerMapping implements Ini } /** - * Detect an all {@linkplain RouterFunction router functions} in the - * current application context. + * Detect all {@linkplain RouterFunction router functions} in the current + * application context. */ private void initRouterFunctions() { List> routerFunctions = obtainApplicationContext() diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMapping.java index 2d7cc9899a..0e9b4dff1c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMapping.java @@ -297,7 +297,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-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java index 8c5743a589..814f9dcb35 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java @@ -204,9 +204,9 @@ 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 + * 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}. + * is under one of the {@linkplain #setAllowedLocations allowed locations}. * @param resource the resource to check * @param location the location relative to which the resource was found * @return "true" if resource is in a valid location, "false" otherwise. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java index b11cdeef33..f5a1ada294 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java @@ -525,7 +525,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator /** * Initialize the strategy to use to determine the media type for a resource. * @deprecated as of 5.2.4 this method returns {@code null}, and if a - * subclass returns an actual instance,the instance is used only as a + * subclass returns an actual instance, the instance is used only as a * source of media type mappings, if it contains any. Please, use * {@link #setMediaTypes(Map)} instead, or if you need to change behavior, * you can override {@link #getMediaType(HttpServletRequest, Resource)}. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java index 81d54138cf..0ee486c9aa 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java @@ -637,11 +637,11 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { /** * Whether the given targetUrl has a host that is a "foreign" system in which * case {@link 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 - * the URL does not have a host or the "host" property is not configured. + * @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 * @since 4.3 */ protected boolean isRemoteHost(String targetUrl) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfStamperView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfStamperView.java index 81b36d7eec..2b6e65376d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfStamperView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfStamperView.java @@ -100,7 +100,7 @@ public abstract class AbstractPdfStamperView extends AbstractUrlBasedView { * * // set some values on the form * form.setField("field1", "value1"); - * form.setField("field2", "Value2"); + * form.setField("field2", "value2"); * * // set the disposition and filename * response.setHeader("Content-disposition", "attachment; FILENAME=someName.pdf");