From 729ce4108de953d27e860394f04a0483a2d41e88 Mon Sep 17 00:00:00 2001 From: HeemangHan Date: Sun, 18 Nov 2018 00:31:01 +0900 Subject: [PATCH] Correct typos (#2018) --- .../intercept/ConstructorInvocation.java | 2 +- .../aop/framework/CglibAopProxy.java | 2 +- .../CustomizableTraceInterceptor.java | 2 +- .../web/filter/ForwardedHeaderFilter.java | 6 +++--- .../resource/CssLinkResourceTransformer.java | 10 +++++----- .../CrossOriginAnnotationIntegrationTests.java | 8 ++++---- .../mvc/method/annotation/CrossOriginTests.java | 8 ++++---- src/docs/asciidoc/core/core-aop-api.adoc | 4 ++-- src/docs/asciidoc/core/core-aop.adoc | 6 +++--- src/docs/asciidoc/core/core-beans.adoc | 2 +- .../asciidoc/core/core-databuffer-codec.adoc | 2 +- src/docs/asciidoc/core/core-expressions.adoc | 4 ++-- src/docs/asciidoc/core/core-resources.adoc | 4 ++-- src/docs/asciidoc/core/core-validation.adoc | 2 +- src/docs/asciidoc/integration.adoc | 16 ++++++++-------- .../asciidoc/languages/dynamic-languages.adoc | 2 +- .../foo/ComponentBeanDefinitionParserTests.java | 2 +- 17 files changed, 41 insertions(+), 41 deletions(-) diff --git a/spring-aop/src/main/java/org/aopalliance/intercept/ConstructorInvocation.java b/spring-aop/src/main/java/org/aopalliance/intercept/ConstructorInvocation.java index cfffeed27c..1adb71fb8a 100644 --- a/spring-aop/src/main/java/org/aopalliance/intercept/ConstructorInvocation.java +++ b/spring-aop/src/main/java/org/aopalliance/intercept/ConstructorInvocation.java @@ -19,7 +19,7 @@ package org.aopalliance.intercept; import java.lang.reflect.Constructor; /** - * Description of an invocation to a constuctor, given to an + * Description of an invocation to a constructor, given to an * interceptor upon constructor-call. * *

A constructor invocation is a joinpoint and can be intercepted diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java b/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java index fb0644ab68..217244e895 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java @@ -795,7 +795,7 @@ class CglibAopProxy implements AopProxy, Serializable { *

For advised methods:
*
If the target is static and the advice chain is frozen then a * FixedChainStaticTargetInterceptor specific to the method is used to - * invoke the advice chain. Otherwise a DyanmicAdvisedInterceptor is + * invoke the advice chain. Otherwise a DynamicAdvisedInterceptor is * used.
*
For non-advised methods:
*
Where it can be determined that the method will not return {@code this} diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java index b6318c2e4b..3a28e2140c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java @@ -79,7 +79,7 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor { /** * The {@code $[targetClassName]} placeholder. - * Replaced with the fully-qualifed name of the {@code Class} + * Replaced with the fully-qualified name of the {@code Class} * of the method invocation target. */ public static final String PLACEHOLDER_TARGET_CLASS_NAME = "$[targetClassName]"; diff --git a/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java b/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java index a3b4f9ec19..a08e0b6f71 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java @@ -364,16 +364,16 @@ public class ForwardedHeaderFilter extends OncePerRequestFilter { if (this.requestUri == null) { return this.delegate.get().getRequestURI(); } - recalculatePathsIfNecesary(); + recalculatePathsIfNecessary(); return this.requestUri; } public StringBuffer getRequestUrl() { - recalculatePathsIfNecesary(); + recalculatePathsIfNecessary(); return new StringBuffer(this.requestUrl); } - private void recalculatePathsIfNecesary() { + private void recalculatePathsIfNecessary() { if (!this.actualRequestUri.equals(this.delegate.get().getRequestURI())) { // Underlying path change (e.g. Servlet FORWARD). this.actualRequestUri = this.delegate.get().getRequestURI(); diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/CssLinkResourceTransformer.java b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/CssLinkResourceTransformer.java index da7136ae1d..cb591be393 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/CssLinkResourceTransformer.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/CssLinkResourceTransformer.java @@ -75,23 +75,23 @@ public class CssLinkResourceTransformer extends ResourceTransformerSupport { ResourceTransformerChain transformerChain) { return transformerChain.transform(exchange, inputResource) - .flatMap(ouptputResource -> { - String filename = ouptputResource.getFilename(); + .flatMap(outputResource -> { + String filename = outputResource.getFilename(); if (!"css".equals(StringUtils.getFilenameExtension(filename)) || inputResource instanceof EncodedResourceResolver.EncodedResource || inputResource instanceof GzipResourceResolver.GzippedResource) { - return Mono.just(ouptputResource); + return Mono.just(outputResource); } DataBufferFactory bufferFactory = exchange.getResponse().bufferFactory(); Flux flux = DataBufferUtils - .read(ouptputResource, bufferFactory, StreamUtils.BUFFER_SIZE); + .read(outputResource, bufferFactory, StreamUtils.BUFFER_SIZE); return DataBufferUtils.join(flux) .flatMap(dataBuffer -> { CharBuffer charBuffer = DEFAULT_CHARSET.decode(dataBuffer.asByteBuffer()); DataBufferUtils.release(dataBuffer); String cssContent = charBuffer.toString(); - return transformContent(cssContent, ouptputResource, transformerChain, exchange); + return transformContent(cssContent, outputResource, transformerChain, exchange); }); }); } diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java index bdb7cb90db..8edc02e19e 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java @@ -254,23 +254,23 @@ public class CrossOriginAnnotationIntegrationTests extends AbstractRequestMappin @CrossOrigin @GetMapping(path = "/ambiguous-header", headers = "header1=a") - public void ambigousHeader1a() { + public void ambiguousHeader1a() { } @CrossOrigin @GetMapping(path = "/ambiguous-header", headers = "header1=b") - public void ambigousHeader1b() { + public void ambiguousHeader1b() { } @CrossOrigin @GetMapping(path = "/ambiguous-produces", produces = "application/xml") - public String ambigousProducesXml() { + public String ambiguousProducesXml() { return ""; } @CrossOrigin @GetMapping(path = "/ambiguous-produces", produces = "application/json") - public String ambigousProducesJson() { + public String ambiguousProducesJson() { return "{}"; } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java index 8e78eb08c0..8f5e1368e6 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java @@ -338,23 +338,23 @@ public class CrossOriginTests { @CrossOrigin @GetMapping(path = "/ambiguous-header", headers = "header1=a") - public void ambigousHeader1a() { + public void ambiguousHeader1a() { } @CrossOrigin @GetMapping(path = "/ambiguous-header", headers = "header1=b") - public void ambigousHeader1b() { + public void ambiguousHeader1b() { } @CrossOrigin @GetMapping(path = "/ambiguous-produces", produces = "application/xml") - public String ambigousProducesXml() { + public String ambiguousProducesXml() { return ""; } @CrossOrigin @GetMapping(path = "/ambiguous-produces", produces = "application/json") - public String ambigousProducesJson() { + public String ambiguousProducesJson() { return "{}"; } diff --git a/src/docs/asciidoc/core/core-aop-api.adoc b/src/docs/asciidoc/core/core-aop-api.adoc index e9b50444b1..67b0e7f0ec 100644 --- a/src/docs/asciidoc/core/core-aop-api.adoc +++ b/src/docs/asciidoc/core/core-aop-api.adoc @@ -1309,7 +1309,7 @@ infrastructure, which enables modification of any bean definition as the contain In this model, you set up some special bean definitions in your XML bean definition file to configure the auto-proxy infrastructure. This lets you declare the targets -eligible for auto-proxying. You neet not use `ProxyFactoryBean`. +eligible for auto-proxying. You need not use `ProxyFactoryBean`. There are two ways to do this: @@ -1526,7 +1526,7 @@ pooling API. NOTE: Commons Pool 1.5+ is also supported but is deprecated as of Spring Framework 4.2. -The following listig shows an example configuration: +The following listing shows an example configuration: ==== [source,xml,indent=0] diff --git a/src/docs/asciidoc/core/core-aop.adoc b/src/docs/asciidoc/core/core-aop.adoc index ded0a3358a..93fda589e9 100644 --- a/src/docs/asciidoc/core/core-aop.adoc +++ b/src/docs/asciidoc/core/core-aop.adoc @@ -1940,7 +1940,7 @@ the return value should be passed, as the following example shows: The `doAccessCheck` method must declare a parameter named `retVal`. The type of this parameter constrains matching in the same way as described for `@AfterReturning`. For -example, you can decleare the method signature as follows: +example, you can declare the method signature as follows: ==== [source,java,indent=0] @@ -2219,7 +2219,7 @@ Consider the following driver script: ---- ==== -With such a Boot class, we would get output similar to the folloiwng on standard output: +With such a Boot class, we would get output similar to the following on standard output: ==== [literal] @@ -3386,7 +3386,7 @@ file, and the Spring configuration) are in place, we can create the following dr We have one last thing to do. The introduction to this section did say that one could switch on LTW selectively on a per-`ClassLoader` basis with Spring, and this is true. However, for this example, we use a Java agent (supplied with Spring) -to switch on the LTW. We use the folloiwng command to run the `Main` class shown earlier: +to switch on the LTW. We use the following command to run the `Main` class shown earlier: ==== [literal] diff --git a/src/docs/asciidoc/core/core-beans.adoc b/src/docs/asciidoc/core/core-beans.adoc index 0de9682805..25c9d47ebd 100644 --- a/src/docs/asciidoc/core/core-beans.adoc +++ b/src/docs/asciidoc/core/core-beans.adoc @@ -6991,7 +6991,7 @@ implementation type, it is safer to declare the most specific return type possib A `@Bean`-annotated method can have an arbitrary number of parameters that describe the dependencies required to build that bean. For instance, if our `TransferService` requires an `AccountRepository`, we can materialize that dependency with a method -parameter, as the followig example shows: +parameter, as the following example shows: ==== [source,java,indent=0] diff --git a/src/docs/asciidoc/core/core-databuffer-codec.adoc b/src/docs/asciidoc/core/core-databuffer-codec.adoc index 8b95329692..e23c07ebfd 100644 --- a/src/docs/asciidoc/core/core-databuffer-codec.adoc +++ b/src/docs/asciidoc/core/core-databuffer-codec.adoc @@ -97,7 +97,7 @@ composite buffers, if that's supported by the underlying byte buffer API. [[codecs]] == Codecs -The `org.springframework.core.codec` package provides the following stragy interfaces: +The `org.springframework.core.codec` package provides the following strategy interfaces: * `Encoder` to encode `Publisher` into a stream of data buffers. * `Decoder` to decode `Publisher` into a stream of higher level objects. diff --git a/src/docs/asciidoc/core/core-expressions.adoc b/src/docs/asciidoc/core/core-expressions.adoc index d9f1006781..57b8437cd2 100644 --- a/src/docs/asciidoc/core/core-expressions.adoc +++ b/src/docs/asciidoc/core/core-expressions.adoc @@ -1082,7 +1082,7 @@ following example shows how to use variables: The `#this` variable is always defined and refers to the current evaluation object (against which unqualified references are resolved). The `#root` variable is always defined and refers to the root context object. Although `#this` may vary as components of -an expression are evaluated, `#root` always refers to the root. The followig examples +an expression are evaluated, `#root` always refers to the root. The following examples show how to use the `#this` and `#root` variables: ==== @@ -1271,7 +1271,7 @@ The following example shows how to use the Elvis operator: ---- ==== -The following listing ahows A more complex example: +The following listing shows A more complex example: ==== [source,java,indent=0] diff --git a/src/docs/asciidoc/core/core-resources.adoc b/src/docs/asciidoc/core/core-resources.adoc index 78d5eb06dd..372d7bd11c 100644 --- a/src/docs/asciidoc/core/core-resources.adoc +++ b/src/docs/asciidoc/core/core-resources.adoc @@ -462,7 +462,7 @@ the current working directory). Note that the use of the special classpath prefix or a standard URL prefix on the location path overrides the default type of `Resource` created to load the -definition. Consider the folowing example: +definition. Consider the following example: [source,java,indent=0] [subs="verbatim,quotes"] @@ -711,7 +711,7 @@ In practice, this means the following examples are equivalent: ---- ==== -The following exmaples are also equivalent (even though it would make sense for them to be different, as one +The following examples are also equivalent (even though it would make sense for them to be different, as one case is relative and the other absolute): ==== diff --git a/src/docs/asciidoc/core/core-validation.adoc b/src/docs/asciidoc/core/core-validation.adoc index bbad3ba393..ff1bae19bd 100644 --- a/src/docs/asciidoc/core/core-validation.adoc +++ b/src/docs/asciidoc/core/core-validation.adoc @@ -262,7 +262,7 @@ the `BeanWrapper` directly. If you use only the `DataBinder` and the `BeanFactor and their default implementations, you should skip ahead to the <>.) -The following two example classess use the `BeanWrapper` to get and set +The following two example classes use the `BeanWrapper` to get and set properties: ==== diff --git a/src/docs/asciidoc/integration.adoc b/src/docs/asciidoc/integration.adoc index 258ddc1e08..c493051ab5 100644 --- a/src/docs/asciidoc/integration.adoc +++ b/src/docs/asciidoc/integration.adoc @@ -1079,7 +1079,7 @@ issue, switch to another HTTP client library. ===== URIs Many of the `RestTemplate` methods accept a URI template and URI template variables, -either as a `String` variable argumet, or as `Map`. +either as a `String` variable argument, or as `Map`. The following example uses a `String` variable argument: @@ -2044,7 +2044,7 @@ these callback methods. [[jms-receiving]] === Receiving a Message -This describes how to recieve messages with JMS in Spring. +This describes how to receive messages with JMS in Spring. [[jms-receiving-sync]] @@ -2241,7 +2241,7 @@ The next example shows another MDP that can handle only receiving JMS defaults to `handleMessage`), but it is configurable (as you can see later in this section). Notice also how the `receive(..)` method is strongly typed to receive and respond only to JMS `TextMessage` messages. -The following listing shows the definition of the `TextMessageDelegage` interface: +The following listing shows the definition of the `TextMessageDelegate` interface: ==== [source,java,indent=0] @@ -2627,7 +2627,7 @@ and programmatically register only your endpoints through `JmsListenerConfigurer ==== Annotated Endpoint Method Signature So far, we have been injecting a simple `String` in our endpoint, but it can actually -have a very flexible method signature. In the follwoing example, we rewrite it to inject the `Order` with +have a very flexible method signature. In the following example, we rewrite it to inject the `Order` with a custom header: ==== @@ -5364,7 +5364,7 @@ could resemble the following example in non-managed mode: ==== In managed mode (that is, in a Java EE environment), the configuration could resemble -the followig example: +the following example: ==== [source,xml,indent=0] @@ -6062,7 +6062,7 @@ to create a `MimeMessage`, as the following example shows: ==== Sending Attachments and Inline Resources Multipart email messages allow for both attachments and inline resources. Examples of -inline resources includee an image or a stylesheet that you want to use in your message but +inline resources include an image or a stylesheet that you want to use in your message but that you do not want displayed as an attachment. [[mail-javamail-mime-attachments-attachment]] @@ -6139,7 +6139,7 @@ is okay in the context of the aforementioned examples, where the intent was to s the very basics of the API. In your typical enterprise application, though, developers often do not create the content -of email messagess by using the previously shown approach for a number of reasons: +of email messages by using the previously shown approach for a number of reasons: * Creating HTML-based email content in Java code is tedious and error prone. * There is no clear separation between display logic and business logic. @@ -8251,7 +8251,7 @@ The following example shows how to do so: ---- ==== -The `CompositeCacheManager` in the preceding chains multiple `CacheManager` istancess and, +The `CompositeCacheManager` in the preceding chains multiple `CacheManager` instances and, through the `fallbackToNoOpCache` flag, adds a no-op cache for all the definitions not handled by the configured cache managers. That is, every cache definition not found in either `jdkCache` or `gemfireCache` (configured earlier in the example) is diff --git a/src/docs/asciidoc/languages/dynamic-languages.adoc b/src/docs/asciidoc/languages/dynamic-languages.adoc index 44bb67b8b5..c2544c02f1 100644 --- a/src/docs/asciidoc/languages/dynamic-languages.adoc +++ b/src/docs/asciidoc/languages/dynamic-languages.adoc @@ -717,7 +717,7 @@ The following example shows the BeanShell "`implementation`" (we use the term lo ---- ==== -The following exxample shows the Spring XML that defines an "`instance`" of the above "`class`" (again, +The following example shows the Spring XML that defines an "`instance`" of the above "`class`" (again, we use these terms very loosely here): ==== diff --git a/src/test/java/com/foo/ComponentBeanDefinitionParserTests.java b/src/test/java/com/foo/ComponentBeanDefinitionParserTests.java index 4a036f6c27..ace2d8dbfa 100644 --- a/src/test/java/com/foo/ComponentBeanDefinitionParserTests.java +++ b/src/test/java/com/foo/ComponentBeanDefinitionParserTests.java @@ -66,7 +66,7 @@ public class ComponentBeanDefinitionParserTests { } @Test - public void testBionicSecondLevenChildren() throws Exception { + public void testBionicSecondLevelChildren() throws Exception { Component cp = getBionicFamily(); List components = cp.getComponents().get(0).getComponents(); assertThat(2, equalTo(components.size()));