From a6f4862f13f96026bad09d4f40de933035043433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=B7=E6=99=BA=E5=86=AC?= Date: Sun, 1 Sep 2019 21:45:49 +0800 Subject: [PATCH] Fix typos related to indefinite articles Closes gh-23555 --- .../springframework/beans/AbstractPropertyAccessorTests.java | 2 +- .../org/springframework/http/StreamingHttpOutputMessage.java | 2 +- .../httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java | 2 +- .../web/reactive/function/server/RequestPredicates.java | 2 +- .../org/springframework/web/servlet/HandlerInterceptor.java | 2 +- .../web/servlet/function/RequestPredicates.java | 2 +- .../servlet/mvc/support/DefaultHandlerExceptionResolver.java | 4 ++-- .../web/servlet/support/ServletUriComponentsBuilder.java | 2 +- .../org/springframework/web/servlet/view/RedirectView.java | 2 +- .../web/servlet/view/ResourceBundleViewResolver.java | 2 +- src/docs/asciidoc/languages/kotlin.adoc | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java index 5a643bb0f20..0b7576bad4c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java @@ -1909,7 +1909,7 @@ public abstract class AbstractPropertyAccessorTests { @SuppressWarnings("unused") private static class DifferentTestBean extends TestBean { - // class to test naming of beans in a error message + // class to test naming of beans in an error message } @SuppressWarnings("unused") diff --git a/spring-web/src/main/java/org/springframework/http/StreamingHttpOutputMessage.java b/spring-web/src/main/java/org/springframework/http/StreamingHttpOutputMessage.java index 8085cc2ebf0..a88b5ddb667 100644 --- a/spring-web/src/main/java/org/springframework/http/StreamingHttpOutputMessage.java +++ b/spring-web/src/main/java/org/springframework/http/StreamingHttpOutputMessage.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.io.OutputStream; /** - * Represents a HTTP output message that allows for setting a streaming body. + * Represents an HTTP output message that allows for setting a streaming body. * Note that such messages typically do not support {@link #getBody()} access. * * @author Arjen Poutsma diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java index e35adf1ebb6..836628dda94 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java @@ -202,7 +202,7 @@ public class HttpComponentsHttpInvokerRequestExecutor extends AbstractHttpInvoke } /** - * Create a HttpPost for the given configuration. + * Create an HttpPost for the given configuration. *

The default implementation creates a standard HttpPost with * "application/x-java-serialized-object" as "Content-Type" header. * @param config the HTTP invoker configuration that specifies the 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 f098c57a6cf..ee28004a90a 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 @@ -352,7 +352,7 @@ public abstract class RequestPredicates { void pathExtension(String extension); /** - * Receive notification of a HTTP header predicate. + * Receive notification of an HTTP header predicate. * @param name the name of the HTTP header to check * @param value the desired value of the HTTP header * @see RequestPredicates#headers(Predicate) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java index 262c8e8dfd8..87b7c585e70 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java @@ -81,7 +81,7 @@ public interface HandlerInterceptor { *

DispatcherServlet processes a handler in an execution chain, consisting * of any number of interceptors, with the handler itself at the end. * With this method, each interceptor can decide to abort the execution chain, - * typically sending a HTTP error or writing a custom response. + * typically sending an HTTP error or writing a custom response. *

Note: special considerations apply for asynchronous * request processing. For more details see * {@link org.springframework.web.servlet.AsyncHandlerInterceptor}. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java index 672da39e29f..6c26d70a8c4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java @@ -347,7 +347,7 @@ public abstract class RequestPredicates { void pathExtension(String extension); /** - * Receive notification of a HTTP header predicate. + * Receive notification of an HTTP header predicate. * @param name the name of the HTTP header to check * @param value the desired value of the HTTP header * @see RequestPredicates#headers(Predicate) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java index 0ec73cde8fa..80ab813e250 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java @@ -401,7 +401,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes /** * Handle the case where a {@linkplain org.springframework.http.converter.HttpMessageConverter message converter} - * cannot read from a HTTP request. + * cannot read from an HTTP request. *

The default implementation sends an HTTP 400 error, and returns an empty {@code ModelAndView}. * Alternatively, a fallback view could be chosen, or the HttpMessageNotReadableException could be * rethrown as-is. @@ -422,7 +422,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes /** * Handle the case where a * {@linkplain org.springframework.http.converter.HttpMessageConverter message converter} - * cannot write to a HTTP request. + * cannot write to an HTTP request. *

The default implementation sends an HTTP 500 error, and returns an empty {@code ModelAndView}. * Alternatively, a fallback view could be chosen, or the HttpMessageNotWritableException could * be rethrown as-is. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java index 024d0617c12..6e8533b6a35 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java @@ -70,7 +70,7 @@ public class ServletUriComponentsBuilder extends UriComponentsBuilder { } - // Factory methods based on a HttpServletRequest + // Factory methods based on an HttpServletRequest /** * Prepare a builder from the host, port, scheme, and context path of the 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 72254b133e9..3908568d7ee 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 @@ -55,7 +55,7 @@ import org.springframework.web.util.WebUtils; * but this behavior can be changed by overriding the * {@link #isEligibleProperty(String, Object)} method. * - *

A URL for this view is supposed to be a HTTP redirect URL, i.e. + *

A URL for this view is supposed to be an HTTP redirect URL, i.e. * suitable for HttpServletResponse's {@code sendRedirect} method, which * is what actually does the redirect if the HTTP 1.0 flag is on, or via sending * back an HTTP 303 code - if the HTTP 1.0 compatibility flag is off. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java index 58e0ef1c0de..a2f8dda6b9b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java @@ -147,7 +147,7 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver *

This avoids repeated "yyy1.(parent)=xxx", "yyy2.(parent)=xxx" definitions * in the bundle, especially if all defined views share the same parent. *

The parent will typically define the view class and common attributes. - * Concrete views might simply consist of an URL definition then: + * Concrete views might simply consist of a URL definition then: * a la "yyy1.url=/my.jsp", "yyy2.url=/your.jsp". *

View definitions that define their own parent or carry their own * class can still override this. Strictly speaking, the rule that a diff --git a/src/docs/asciidoc/languages/kotlin.adoc b/src/docs/asciidoc/languages/kotlin.adoc index a0004f699aa..1189bdae35a 100644 --- a/src/docs/asciidoc/languages/kotlin.adoc +++ b/src/docs/asciidoc/languages/kotlin.adoc @@ -130,7 +130,7 @@ since the later requires a reference to the outer class. == Annotations The Spring Framework also takes advantage of https://kotlinlang.org/docs/reference/null-safety.html[Kotlin null-safety] -to determine if a HTTP parameter is required without having to explicitly +to determine if an HTTP parameter is required without having to explicitly define the `required` attribute. That means `@RequestParam name: String?` is treated as not required and, conversely, `@RequestParam name: String` is treated as being required. This feature is also supported on the Spring Messaging `@Header` annotation.