Browse Source

Correct typos (#2018)

pull/2019/head
HeemangHan 6 years ago committed by Sam Brannen
parent
commit
729ce4108d
  1. 2
      spring-aop/src/main/java/org/aopalliance/intercept/ConstructorInvocation.java
  2. 2
      spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java
  3. 2
      spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java
  4. 6
      spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java
  5. 10
      spring-webflux/src/main/java/org/springframework/web/reactive/resource/CssLinkResourceTransformer.java
  6. 8
      spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java
  7. 8
      spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java
  8. 4
      src/docs/asciidoc/core/core-aop-api.adoc
  9. 6
      src/docs/asciidoc/core/core-aop.adoc
  10. 2
      src/docs/asciidoc/core/core-beans.adoc
  11. 2
      src/docs/asciidoc/core/core-databuffer-codec.adoc
  12. 4
      src/docs/asciidoc/core/core-expressions.adoc
  13. 4
      src/docs/asciidoc/core/core-resources.adoc
  14. 2
      src/docs/asciidoc/core/core-validation.adoc
  15. 16
      src/docs/asciidoc/integration.adoc
  16. 2
      src/docs/asciidoc/languages/dynamic-languages.adoc
  17. 2
      src/test/java/com/foo/ComponentBeanDefinitionParserTests.java

2
spring-aop/src/main/java/org/aopalliance/intercept/ConstructorInvocation.java

@ -19,7 +19,7 @@ package org.aopalliance.intercept; @@ -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.
*
* <p>A constructor invocation is a joinpoint and can be intercepted

2
spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java

@ -795,7 +795,7 @@ class CglibAopProxy implements AopProxy, Serializable { @@ -795,7 +795,7 @@ class CglibAopProxy implements AopProxy, Serializable {
* <dt>For advised methods:</dt>
* <dd>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.</dd>
* <dt>For non-advised methods:</dt>
* <dd>Where it can be determined that the method will not return {@code this}

2
spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java

@ -79,7 +79,7 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor { @@ -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]";

6
spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java

@ -364,16 +364,16 @@ public class ForwardedHeaderFilter extends OncePerRequestFilter { @@ -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();

10
spring-webflux/src/main/java/org/springframework/web/reactive/resource/CssLinkResourceTransformer.java

@ -75,23 +75,23 @@ public class CssLinkResourceTransformer extends ResourceTransformerSupport { @@ -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<DataBuffer> 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);
});
});
}

8
spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java

@ -254,23 +254,23 @@ public class CrossOriginAnnotationIntegrationTests extends AbstractRequestMappin @@ -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 "<a></a>";
}
@CrossOrigin
@GetMapping(path = "/ambiguous-produces", produces = "application/json")
public String ambigousProducesJson() {
public String ambiguousProducesJson() {
return "{}";
}

8
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java

@ -338,23 +338,23 @@ public class CrossOriginTests { @@ -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 "<a></a>";
}
@CrossOrigin
@GetMapping(path = "/ambiguous-produces", produces = "application/json")
public String ambigousProducesJson() {
public String ambiguousProducesJson() {
return "{}";
}

4
src/docs/asciidoc/core/core-aop-api.adoc

@ -1309,7 +1309,7 @@ infrastructure, which enables modification of any bean definition as the contain @@ -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. @@ -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]

6
src/docs/asciidoc/core/core-aop.adoc

@ -1940,7 +1940,7 @@ the return value should be passed, as the following example shows: @@ -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: @@ -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 @@ -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]

2
src/docs/asciidoc/core/core-beans.adoc

@ -6991,7 +6991,7 @@ implementation type, it is safer to declare the most specific return type possib @@ -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]

2
src/docs/asciidoc/core/core-databuffer-codec.adoc

@ -97,7 +97,7 @@ composite buffers, if that's supported by the underlying byte buffer API. @@ -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<T>` into a stream of data buffers.
* `Decoder` to decode `Publisher<DataBuffer>` into a stream of higher level objects.

4
src/docs/asciidoc/core/core-expressions.adoc

@ -1082,7 +1082,7 @@ following example shows how to use variables: @@ -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: @@ -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]

4
src/docs/asciidoc/core/core-resources.adoc

@ -462,7 +462,7 @@ the current working directory). @@ -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: @@ -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):
====

2
src/docs/asciidoc/core/core-validation.adoc

@ -262,7 +262,7 @@ the `BeanWrapper` directly. If you use only the `DataBinder` and the `BeanFactor @@ -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 <<beans-beans-conversion,section about
`PropertyEditors`>>.)
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:
====

16
src/docs/asciidoc/integration.adoc

@ -1079,7 +1079,7 @@ issue, switch to another HTTP client library. @@ -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<String,String>`.
either as a `String` variable argument, or as `Map<String,String>`.
The following example uses a `String` variable argument:
@ -2044,7 +2044,7 @@ these callback methods. @@ -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 @@ -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 @@ -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: @@ -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: @@ -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 @@ -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: @@ -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

2
src/docs/asciidoc/languages/dynamic-languages.adoc

@ -717,7 +717,7 @@ The following example shows the BeanShell "`implementation`" (we use the term lo @@ -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):
====

2
src/test/java/com/foo/ComponentBeanDefinitionParserTests.java

@ -66,7 +66,7 @@ public class ComponentBeanDefinitionParserTests { @@ -66,7 +66,7 @@ public class ComponentBeanDefinitionParserTests {
}
@Test
public void testBionicSecondLevenChildren() throws Exception {
public void testBionicSecondLevelChildren() throws Exception {
Component cp = getBionicFamily();
List<Component> components = cp.getComponents().get(0).getComponents();
assertThat(2, equalTo(components.size()));

Loading…
Cancel
Save