Skip to content

Commit afa38f5

Browse files
committed
Merge pull request #2019 from Hanope
* pr/2019: Polish contribution Fix typos
2 parents 729ce41 + 7b6f2f8 commit afa38f5

File tree

74 files changed

+168
-152
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+168
-152
lines changed

spring-aop/src/main/java/org/aopalliance/intercept/MethodInvocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public interface MethodInvocation extends Invocation {
3232

3333
/**
3434
* Get the method being called.
35-
* <p>This method is a frienly implementation of the
35+
* <p>This method is a friendly implementation of the
3636
* {@link Joinpoint#getStaticPart()} method (same result).
3737
* @return the method being called
3838
*/

spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedenceInformation, Serializable {
6464

6565
/**
66-
* Key used in ReflectiveMethodInvocation userAtributes map for the current joinpoint.
66+
* Key used in ReflectiveMethodInvocation userAttributes map for the current joinpoint.
6767
*/
6868
protected static final String JOIN_POINT_KEY = JoinPoint.class.getName();
6969

spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ public void setAge(int a) {}
758758

759759
@Around(value="setAge(age)",argNames="age")
760760
// @ArgNames({"age"}) // AMC needs more work here? ignoring pjp arg... ok??
761-
// argNames should be suported in Around as it is in Pointcut
761+
// argNames should be supported in Around as it is in Pointcut
762762
public void changeReturnType(ProceedingJoinPoint pjp, int age) throws Throwable {
763763
pjp.proceed(new Object[] {age*2});
764764
}
@@ -884,12 +884,12 @@ public int preventExecution(ProceedingJoinPoint pjp) {
884884
@Aspect
885885
abstract class AbstractMakeModifiable {
886886

887-
public interface MutableModifable extends Modifiable {
887+
public interface MutableModifiable extends Modifiable {
888888

889889
void markDirty();
890890
}
891891

892-
public static class ModifiableImpl implements MutableModifable {
892+
public static class ModifiableImpl implements MutableModifiable {
893893

894894
private boolean modified;
895895

@@ -911,7 +911,7 @@ public void markDirty() {
911911

912912
@Before(value="execution(void set*(*)) && this(modifiable) && args(newValue)", argNames="modifiable,newValue")
913913
public void recordModificationIfSetterArgumentDiffersFromOldValue(
914-
JoinPoint jp, MutableModifable mixin, Object newValue) {
914+
JoinPoint jp, MutableModifiable mixin, Object newValue) {
915915

916916
/*
917917
* We use the mixin to check and, if necessary, change,
@@ -972,7 +972,7 @@ class MakeITestBeanModifiable extends AbstractMakeModifiable {
972972

973973
@DeclareParents(value = "org.springframework.tests.sample.beans.ITestBean+",
974974
defaultImpl=ModifiableImpl.class)
975-
public static MutableModifable mixin;
975+
public static MutableModifiable mixin;
976976

977977
}
978978

spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -157,7 +157,7 @@ public long getTimeStamp() {
157157
TimeStamped ts = (TimeStamped) pf.getProxy();
158158

159159
assertThat(ts, instanceOf(TimeStamped.class));
160-
// Shoulnd't proxy framework interfaces
160+
// Shouldn't proxy framework interfaces
161161
assertTrue(!(ts instanceof MethodInterceptor));
162162
assertTrue(!(ts instanceof IntroductionInterceptor));
163163

spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected void setIntrospectionClass(Class<?> clazz) {
166166
}
167167

168168
/**
169-
* Obtain a lazily initializted CachedIntrospectionResults instance
169+
* Obtain a lazily initialized CachedIntrospectionResults instance
170170
* for the wrapped object.
171171
*/
172172
private CachedIntrospectionResults getCachedIntrospectionResults() {

spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public static Object resolveAutowiringValue(Object autowiringValue, Class<?> req
158158
* on the given method itself.
159159
* <p>For example, given a factory method with the following signature, if
160160
* {@code resolveReturnTypeForFactoryMethod()} is invoked with the reflected
161-
* method for {@code creatProxy()} and an {@code Object[]} array containing
161+
* method for {@code createProxy()} and an {@code Object[]} array containing
162162
* {@code MyService.class}, {@code resolveReturnTypeForFactoryMethod()} will
163163
* infer that the target return type is {@code MyService}.
164164
* <pre class="code">{@code public static <T> T createProxy(Class<T> clazz)}</pre>

spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public BeanDefinitionBuilder setAutowireMode(int autowireMode) {
278278
}
279279

280280
/**
281-
* Set the depency check mode for this definition.
281+
* Set the dependency check mode for this definition.
282282
*/
283283
public BeanDefinitionBuilder setDependencyCheck(int dependencyCheck) {
284284
this.beanDefinition.setDependencyCheck(dependencyCheck);

spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class BeanDefinitionResource extends AbstractResource {
3939

4040
/**
4141
* Create a new BeanDefinitionResource.
42-
* @param beanDefinition the BeanDefinition objectto wrap
42+
* @param beanDefinition the BeanDefinition object to wrap
4343
*/
4444
public BeanDefinitionResource(BeanDefinition beanDefinition) {
4545
Assert.notNull(beanDefinition, "BeanDefinition must not be null");

spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void setValidAndInvalidPropertyValuesShouldContainExceptionDetails() {
8989
catch (PropertyBatchUpdateException ex) {
9090
assertTrue("Must contain 2 exceptions", ex.getExceptionCount() == 2);
9191
// Test validly set property matches
92-
assertTrue("Vaid set property must stick", target.getName().equals(newName));
92+
assertTrue("Valid set property must stick", target.getName().equals(newName));
9393
assertTrue("Invalid set property must retain old value", target.getAge() == 0);
9494
assertTrue("New value of dodgy setter must be available through exception",
9595
ex.getPropertyAccessException("touchy").getPropertyChangeEvent().getNewValue().equals(invalidTouchy));

spring-context-support/src/test/java/org/springframework/mail/javamail/InternetAddressEditorTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -58,7 +58,7 @@ public void allWhitespace() {
5858
}
5959

6060
@Test
61-
public void simpleGoodAddess() {
61+
public void simpleGoodAddress() {
6262
editor.setAsText(SIMPLE);
6363
assertEquals("Simple email address failed", SIMPLE, editor.getAsText());
6464
}

spring-context/src/main/java/org/springframework/context/MessageSourceAware.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2011 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ public interface MessageSourceAware extends Aware {
3838
* <p>Invoked after population of normal bean properties but before an init
3939
* callback like InitializingBean's afterPropertiesSet or a custom init-method.
4040
* Invoked before ApplicationContextAware's setApplicationContext.
41-
* @param messageSource message sourceto be used by this object
41+
* @param messageSource message source to be used by this object
4242
*/
4343
void setMessageSource(MessageSource messageSource);
4444

spring-context/src/main/java/org/springframework/context/annotation/PropertySource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
* last.
139139
*
140140
* <p>In certain situations, it may not be possible or practical to tightly control
141-
* property source ordering when using {@code @ProperySource} annotations. For example,
141+
* property source ordering when using {@code @PropertySource} annotations. For example,
142142
* if the {@code @Configuration} classes above were registered via component-scanning,
143143
* the ordering is difficult to predict. In such cases - and if overriding is important -
144144
* it is recommended that the user fall back to using the programmatic PropertySource API.

spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ protected boolean isHomeRefreshable() {
183183

184184

185185
/**
186-
* Prepares the thread context if necessar, and delegates to
186+
* Prepares the thread context if necessary, and delegates to
187187
* {@link #invokeInContext}.
188188
*/
189189
@Override

spring-context/src/main/java/org/springframework/jmx/export/MBeanExportOperations.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323
* accessed by application developers during application runtime.
2424
*
2525
* <p>This interface should be used to export application resources to JMX using Spring's
26-
* management interface generation capabilties and, optionally, it's {@link ObjectName}
26+
* management interface generation capabilities and, optionally, it's {@link ObjectName}
2727
* generation capabilities.
2828
*
2929
* @author Rob Harrop

spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ public void unregisterManagedResource(ObjectName objectName) {
509509
/**
510510
* Register the defined beans with the {@link MBeanServer}.
511511
* <p>Each bean is exposed to the {@code MBeanServer} via a
512-
* {@code ModelMBean}. The actual implemetation of the
512+
* {@code ModelMBean}. The actual implementation of the
513513
* {@code ModelMBean} interface used depends on the implementation of
514514
* the {@code ModelMBeanProvider} interface that is configured. By
515515
* default the {@code RequiredModelMBean} class that is supplied with

spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssembler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@ public void setManagedMethods(String... methodNames) {
8484
* The property key should match the bean key and the property value should match
8585
* the list of method names. When searching for method names for a bean, Spring
8686
* will check these mappings first.
87-
* @param mappings the mappins of bean keys to method names
87+
* @param mappings the mappings of bean keys to method names
8888
*/
8989
public void setMethodMappings(Properties mappings) {
9090
this.methodMappings = new HashMap<>();

spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
2727
* implementing the {@link NotificationPublisherAware} interface. After a particular
2828
* managed resource instance is registered with the {@link javax.management.MBeanServer},
2929
* Spring will inject a {@code NotificationPublisher} instance into it if that
30-
* resource implements the {@link NotificationPublisherAware} inteface.
30+
* resource implements the {@link NotificationPublisherAware} interface.
3131
*
3232
* <p>Each managed resource instance will have a distinct instance of a
3333
* {@code NotificationPublisher} implementation. This instance will keep

spring-context/src/main/java/org/springframework/jndi/JndiObjectLocator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -103,7 +103,7 @@ public void afterPropertiesSet() throws IllegalArgumentException, NamingExceptio
103103
* Perform the actual JNDI lookup for this locator's target resource.
104104
* @return the located target object
105105
* @throws NamingException if the JNDI lookup failed or if the
106-
* located JNDI object is not assigable to the expected type
106+
* located JNDI object is not assignable to the expected type
107107
* @see #setJndiName
108108
* @see #setExpectedType
109109
* @see #lookup(String, Class)

spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAnnotationBindingTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void testNoMatchingWithoutAnnotationPresent() {
5959
}
6060

6161
@Test
62-
public void testPointcutEvaulatedAgainstArray() {
62+
public void testPointcutEvaluatedAgainstArray() {
6363
ctx.getBean("arrayFactoryBean");
6464
}
6565

spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public void testTargetCanGetProxy() {
365365
assertEquals("Only one invocation via AOP as use of this wasn't proxied", 1, di.getCount());
366366
// 1 invocation
367367
assertEquals("Increment happened", 1, proxied.getCount());
368-
proxied.incrementViaProxy(); // 2 invoocations
368+
proxied.incrementViaProxy(); // 2 invocations
369369
assertEquals("Increment happened", 2, target.getCount());
370370
assertEquals("3 more invocations via AOP as the first call was reentrant through the proxy", 4, di.getCount());
371371
}
@@ -511,7 +511,7 @@ public Object invoke(MethodInvocation invocation) throws Throwable {
511511
}
512512

513513
@Test
514-
public void testUndeclaredUnheckedException() throws Throwable {
514+
public void testUndeclaredUncheckedException() throws Throwable {
515515
final RuntimeException unexpectedException = new RuntimeException();
516516
// Test return value
517517
MethodInterceptor mi = new MethodInterceptor() {
@@ -786,7 +786,7 @@ public void testCannotAddIntroductionAdviceWithUnimplementedInterface() throws T
786786

787787
/**
788788
* Note that an introduction can't throw an unexpected checked exception,
789-
* as it's constained by the interface.
789+
* as it's constrained by the interface.
790790
*/
791791
@Test
792792
public void testIntroductionThrowsUncheckedException() throws Throwable {

spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -161,7 +161,7 @@ public void testHitMaxSize() throws Exception {
161161
// desired
162162
}
163163

164-
// lets now release an object and try to accquire a new one
164+
// lets now release an object and try to acquire a new one
165165
targetSource.releaseTarget(pooledInstances[9]);
166166
pooledInstances[9] = targetSource.getTarget();
167167

@@ -194,7 +194,7 @@ public void testHitMaxSizeLoadedFromContext() throws Exception {
194194
// desired
195195
}
196196

197-
// lets now release an object and try to accquire a new one
197+
// lets now release an object and try to acquire a new one
198198
targetSource.releaseTarget(pooledInstances[9]);
199199
pooledInstances[9] = targetSource.getTarget();
200200

spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ public void setBeanFactory(BeanFactory beanFactory) {
4141
public void afterPropertiesSet() {
4242
super.afterPropertiesSet();
4343
if (this.owningContext == null)
44-
throw new RuntimeException("Factory didn't call setAppliationContext before afterPropertiesSet on lifecycle bean");
44+
throw new RuntimeException("Factory didn't call setApplicationContext before afterPropertiesSet on lifecycle bean");
4545
}
4646

4747
@Override

spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ public class ComponentScanAnnotationTests {
3333

3434
@Test
3535
public void noop() {
36-
// no-op; the @ComponentScan-annotated MyConfig class below simply excercises
36+
// no-op; the @ComponentScan-annotated MyConfig class below simply exercises
3737
// available attributes of the annotation.
3838
}
3939
}

spring-context/src/test/java/org/springframework/context/support/LiveBeansViewTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void registerUnregisterSingleContext() throws MalformedObjectNameExceptio
6464
}
6565

6666
@Test
67-
public void registerUnregisterServeralContexts() throws MalformedObjectNameException {
67+
public void registerUnregisterSeveralContexts() throws MalformedObjectNameException {
6868
this.environment.setProperty(LiveBeansView.MBEAN_DOMAIN_PROPERTY_NAME, this.name.getMethodName());
6969
ConfigurableApplicationContext context = createApplicationContext("app");
7070
ConfigurableApplicationContext childContext = createApplicationContext("child");
@@ -80,7 +80,7 @@ public void registerUnregisterServeralContexts() throws MalformedObjectNameExcep
8080
}
8181

8282
@Test
83-
public void registerUnregisterServeralContextsDifferentOrder() throws MalformedObjectNameException {
83+
public void registerUnregisterSeveralContextsDifferentOrder() throws MalformedObjectNameException {
8484
this.environment.setProperty(LiveBeansView.MBEAN_DOMAIN_PROPERTY_NAME, this.name.getMethodName());
8585
ConfigurableApplicationContext context = createApplicationContext("app");
8686
ConfigurableApplicationContext childContext = createApplicationContext("child");

spring-context/src/test/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssemblerMappedTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -127,7 +127,7 @@ private InterfaceBasedMBeanInfoAssembler getWithMapping(String name, String mapp
127127
private void assertNickName(MBeanAttributeInfo attr) {
128128
assertNotNull("Nick Name should not be null", attr);
129129
assertTrue("Nick Name should be writable", attr.isWritable());
130-
assertTrue("Nick Name should be readab;e", attr.isReadable());
130+
assertTrue("Nick Name should be readable", attr.isReadable());
131131
}
132132

133133
}

spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public void getMergedAnnotationAttributesFavorsInheritedComposedAnnotationsOverM
262262
Class<?> element = SubSubClassWithInheritedComposedAnnotation.class;
263263
String name = TX_NAME;
264264
AnnotationAttributes attributes = getMergedAnnotationAttributes(element, name);
265-
assertNotNull("AnnotationAttributtes for @Transactional on SubSubClassWithInheritedComposedAnnotation.", attributes);
265+
assertNotNull("AnnotationAttributes for @Transactional on SubSubClassWithInheritedComposedAnnotation.", attributes);
266266
// Verify contracts between utility methods:
267267
assertTrue(isAnnotated(element, name));
268268
assertFalse("readOnly flag for SubSubClassWithInheritedComposedAnnotation.", attributes.getBoolean("readOnly"));

0 commit comments

Comments
 (0)