From 17699103dc776778a527cddbb8f8859bd6cbf418 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Sun, 15 Mar 2026 15:22:21 +0100 Subject: [PATCH 1/2] Consistently use American English spelling Since the Spring Framework uses American English spelling, this commit updates Javadoc and the reference manual to ensure consistency in that regard. However, there are two exceptions to this rule that arise due to their use within a technical context. - We use "cancelled/cancelling" instead of "canceled/canceling" in numerous places (including error messages). - We use "implementor" instead of "implementer". Closes gh-36470 --- .../core/beans/context-introduction.adoc | 2 +- .../annotation/AspectJProxyFactory.java | 2 +- ...ntiationModelAwarePointcutAdvisorImpl.java | 4 +- ...erTargetObjectIntroductionInterceptor.java | 2 +- .../DelegatingIntroductionInterceptor.java | 2 +- .../support/DynamicMethodMatcherPointcut.java | 2 +- .../AbstractAspectJAdvisorFactoryTests.java | 4 +- .../factory/xml/XmlBeanDefinitionReader.java | 2 +- .../annotation/AutowiredKotlinTests.kt | 20 +++--- .../beans/{Colour.java => Color.java} | 18 +----- .../beans/testfixture/beans/TestBean.java | 20 +++--- .../ImportAwareAotBeanPostProcessor.java | 2 +- .../ScheduledExecutorFactoryBean.java | 2 +- .../AspectJAutoProxyCreatorTests.java | 2 +- .../autoproxy/benchmark/BenchmarkTests.java | 2 +- .../factory/xml/XmlBeanFactoryTests.java | 2 +- .../CacheResolverCustomizationTests.java | 2 +- .../AutowiredConfigurationTests.java | 64 +++++++++---------- .../ScriptFactoryPostProcessorTests.java | 8 +-- .../validation/DataBinderTests.java | 8 +-- .../jndi/ExpectedLookupTemplate.java | 2 +- .../aot/hint/AbstractTypeReference.java | 2 +- .../codec/AbstractDecoderTests.java | 4 +- .../codec/AbstractEncoderTests.java | 2 +- .../expression/MethodFilter.java | 2 +- .../spel/ExpressionLanguageScenarioTests.java | 4 +- ...rEntityManagerFactoryIntegrationTests.java | 2 +- .../test/json/JsonContent.java | 4 +- .../RuleBasedTransactionAttributeTests.java | 12 ++-- .../web/util/pattern/PathPatternTests.java | 2 +- .../tags/form/AbstractHtmlElementBodyTag.java | 2 +- .../view/AbstractCachingViewResolver.java | 2 +- .../servlet/tags/form/CheckboxTagTests.java | 21 +++--- .../servlet/tags/form/CheckboxesTagTests.java | 9 +-- .../web/servlet/tags/form/OptionTagTests.java | 4 +- .../tags/form/RadioButtonsTagTests.java | 10 +-- 36 files changed, 117 insertions(+), 137 deletions(-) rename spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/{Colour.java => Color.java} (65%) diff --git a/framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc b/framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc index 4bafff8d45f..5c9a06d1620 100644 --- a/framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc +++ b/framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc @@ -575,7 +575,7 @@ Kotlin:: ---- ====== -NOTE: Do not define such beans to be lazy as the `ApplicationContext` will honour that and will not register the method to listen to events. +NOTE: Do not define such beans to be lazy as the `ApplicationContext` will honor that and will not register the method to listen to events. The method signature once again declares the event type to which it listens, but, this time, with a flexible name and without implementing a specific listener interface. diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java index 28cf4cb8620..ffd6d00ad21 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java @@ -83,7 +83,7 @@ public class AspectJProxyFactory extends ProxyCreatorSupport { /** * Add the supplied aspect instance to the chain. The type of the aspect instance - * supplied must be a singleton aspect. True singleton lifecycle is not honoured when + * supplied must be a singleton aspect. True singleton lifecycle is not honored when * using this method - the caller is responsible for managing the lifecycle of any * aspects added in this way. * @param aspectInstance the AspectJ aspect instance diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java index 7e59bfe6256..98ed619760e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java @@ -119,7 +119,7 @@ final class InstantiationModelAwarePointcutAdvisorImpl /** * The pointcut for Spring AOP to use. - * Actual behaviour of the pointcut will change depending on the state of the advice. + * Actual behavior of the pointcut will change depending on the state of the advice. */ @Override public Pointcut getPointcut() { @@ -258,7 +258,7 @@ final class InstantiationModelAwarePointcutAdvisorImpl /** - * Pointcut implementation that changes its behaviour when the advice is instantiated. + * Pointcut implementation that changes its behavior when the advice is instantiated. * Note that this is a dynamic pointcut; otherwise it might be optimized out * if it does not at first match statically. */ diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java index 6bc92ca9dda..b1fe7913e20 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java @@ -82,7 +82,7 @@ public class DelegatePerTargetObjectIntroductionInterceptor extends Introduction /** * Subclasses may need to override this if they want to perform custom - * behaviour in around advice. However, subclasses should invoke this + * behavior in around advice. However, subclasses should invoke this * method, which handles introduced interfaces and forwarding to the target. */ @Override diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java index cc951638aa4..ffdd4c31630 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java @@ -97,7 +97,7 @@ public class DelegatingIntroductionInterceptor extends IntroductionInfoSupport /** * Subclasses may need to override this if they want to perform custom - * behaviour in around advice. However, subclasses should invoke this + * behavior in around advice. However, subclasses should invoke this * method, which handles introduced interfaces and forwarding to the target. */ @Override diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java index 698c80f1447..5f93bfad3f8 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java @@ -24,7 +24,7 @@ import org.springframework.aop.Pointcut; * Convenient superclass when we want to force subclasses to * implement MethodMatcher interface, but subclasses * will want to be pointcuts. The getClassFilter() method can - * be overridden to customize ClassFilter behaviour as well. + * be overridden to customize ClassFilter behavior as well. * * @author Rod Johnson */ diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java index fdd5006f9a4..c88562fbd53 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java @@ -430,8 +430,8 @@ abstract class AbstractAspectJAdvisorFactoryTests { assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(itb::getAge); } - // TODO document this behaviour. - // Is it different AspectJ behaviour, at least for checked exceptions? + // TODO document this behavior. + // Is it different AspectJ behavior, at least for checked exceptions? @Test void aspectMethodThrowsExceptionIllegalOnSignature() { TestBean target = new TestBean(); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReader.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReader.java index 530e9c241cf..b7b4cf63431 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReader.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReader.java @@ -211,7 +211,7 @@ public class XmlBeanDefinitionReader extends AbstractBeanDefinitionReader { /** * Specify which {@link org.springframework.beans.factory.parsing.ProblemReporter} to use. *
The default implementation is {@link org.springframework.beans.factory.parsing.FailFastProblemReporter} - * which exhibits fail fast behaviour. External tools can provide an alternative implementation + * which exhibits fail fast behavior. External tools can provide an alternative implementation * that collates errors and warnings for display in the tool UI. */ public void setProblemReporter(@Nullable ProblemReporter problemReporter) { diff --git a/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/AutowiredKotlinTests.kt b/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/AutowiredKotlinTests.kt index 5d8b290176f..916d8edfca5 100644 --- a/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/AutowiredKotlinTests.kt +++ b/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/AutowiredKotlinTests.kt @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test import org.springframework.beans.factory.BeanCreationException import org.springframework.beans.factory.support.DefaultListableBeanFactory import org.springframework.beans.factory.support.RootBeanDefinition -import org.springframework.beans.testfixture.beans.Colour +import org.springframework.beans.testfixture.beans.Color import org.springframework.beans.testfixture.beans.TestBean /** @@ -129,13 +129,13 @@ class AutowiredKotlinTests { bf.registerBeanDefinition("bean", bd) val tb = TestBean() bf.registerSingleton("testBean", tb) - val colour = Colour.BLUE - bf.registerSingleton("colour", colour) + val color = Color.BLUE + bf.registerSingleton("color", color) val kb = bf.getBean("bean", KotlinBeanWithAutowiredSecondaryConstructor::class.java) assertThat(kb.injectedFromConstructor).isSameAs(tb) assertThat(kb.optional).isEqualTo("bar") - assertThat(kb.injectedFromSecondaryConstructor).isSameAs(colour) + assertThat(kb.injectedFromSecondaryConstructor).isSameAs(color) } @Test // SPR-16012 @@ -193,8 +193,8 @@ class AutowiredKotlinTests { bf.registerBeanDefinition("bean", bd) val tb = TestBean() bf.registerSingleton("testBean", tb) - val colour = Colour.BLUE - bf.registerSingleton("colour", colour) + val color = Color.BLUE + bf.registerSingleton("color", color) assertThatExceptionOfType(BeanCreationException::class.java).isThrownBy { bf.getBean("bean", KotlinBeanWithSecondaryConstructor::class.java) @@ -246,12 +246,12 @@ class AutowiredKotlinTests { val optional: String = "foo", val injectedFromConstructor: TestBean ) { - @Autowired constructor(injectedFromSecondaryConstructor: Colour, injectedFromConstructor: TestBean, + @Autowired constructor(injectedFromSecondaryConstructor: Color, injectedFromConstructor: TestBean, optional: String = "bar") : this(optional, injectedFromConstructor) { this.injectedFromSecondaryConstructor = injectedFromSecondaryConstructor } - var injectedFromSecondaryConstructor: Colour? = null + var injectedFromSecondaryConstructor: Color? = null } @Suppress("unused") @@ -268,12 +268,12 @@ class AutowiredKotlinTests { val optional: String = "foo", val injectedFromConstructor: TestBean ) { - constructor(injectedFromSecondaryConstructor: Colour, injectedFromConstructor: TestBean, + constructor(injectedFromSecondaryConstructor: Color, injectedFromConstructor: TestBean, optional: String = "bar") : this(optional, injectedFromConstructor) { this.injectedFromSecondaryConstructor = injectedFromSecondaryConstructor } - var injectedFromSecondaryConstructor: Colour? = null + var injectedFromSecondaryConstructor: Color? = null } } diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Colour.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Color.java similarity index 65% rename from spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Colour.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Color.java index 53f638a8980..1eb38c323b2 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Colour.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Color.java @@ -20,22 +20,8 @@ package org.springframework.beans.testfixture.beans; * @author Rob Harrop * @author Juergen Hoeller */ -public class Colour { +public enum Color { - public static final Colour RED = new Colour("RED"); - public static final Colour BLUE = new Colour("BLUE"); - public static final Colour GREEN = new Colour("GREEN"); - public static final Colour PURPLE = new Colour("PURPLE"); - - private final String name; - - public Colour(String name) { - this.name = name; - } - - @Override - public String toString() { - return this.name; - } + RED, BLUE, GREEN, PURPLE } diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/TestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/TestBean.java index 76ea5a53fed..02eab490ea3 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/TestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/TestBean.java @@ -100,11 +100,11 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt private Number someNumber; - private Colour favouriteColour; + private Color favoriteColor; private Boolean someBoolean; - private List> otherColours; + private List> otherColors; private List> pets; @@ -389,12 +389,12 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt this.someNumber = someNumber; } - public Colour getFavouriteColour() { - return favouriteColour; + public Color getFavoriteColor() { + return favoriteColor; } - public void setFavouriteColour(Colour favouriteColour) { - this.favouriteColour = favouriteColour; + public void setFavouriteColor(Color favoriteColor) { + this.favoriteColor = favoriteColor; } public Boolean getSomeBoolean() { @@ -414,12 +414,12 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt this.nestedIndexedBean = nestedIndexedBean; } - public List> getOtherColours() { - return otherColours; + public List> getOtherColors() { + return otherColors; } - public void setOtherColours(List> otherColours) { - this.otherColours = otherColours; + public void setOtherColors(List> otherColors) { + this.otherColors = otherColors; } public List> getPets() { diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ImportAwareAotBeanPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/ImportAwareAotBeanPostProcessor.java index c0c196aa5b1..2fa7eced761 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ImportAwareAotBeanPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ImportAwareAotBeanPostProcessor.java @@ -30,7 +30,7 @@ import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.util.ClassUtils; /** - * A {@link BeanPostProcessor} that honours {@link ImportAware} callback using + * A {@link BeanPostProcessor} that honors {@link ImportAware} callback using * a mapping computed at build time. * * @author Stephane Nicoll diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java index c48600f98fe..8099b4d48c2 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java @@ -39,7 +39,7 @@ import org.springframework.util.ObjectUtils; * *
Allows for registration of {@link ScheduledExecutorTask ScheduledExecutorTasks},
* automatically starting the {@link ScheduledExecutorService} on initialization and
- * canceling it on destruction of the context. In scenarios that only require static
+ * cancelling it on destruction of the context. In scenarios that only require static
* registration of tasks at startup, there is no need to access the
* {@link ScheduledExecutorService} instance itself in application code at all;
* {@code ScheduledExecutorFactoryBean} is then just being used for lifecycle integration.
diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java
index b1399b9e363..16ab1ad88a0 100644
--- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java
+++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java
@@ -72,7 +72,7 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for AspectJ auto-proxying. Includes mixing with Spring AOP Advisors
- * to demonstrate that existing autoproxying contract is honoured.
+ * to demonstrate that existing autoproxying contract is honored.
*
* @author Rod Johnson
* @author Juergen Hoeller
diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java
index 25d73e2791c..df0268e7570 100644
--- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java
+++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java
@@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for AspectJ auto proxying. Includes mixing with Spring AOP
- * Advisors to demonstrate that existing autoproxying contract is honoured.
+ * Advisors to demonstrate that existing autoproxying contract is honored.
*
* @author Rod Johnson
* @author Chris Beams
diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java
index 20704a2a690..3efb7f590ca 100644
--- a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java
+++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java
@@ -1321,7 +1321,7 @@ class XmlBeanFactoryTests {
assertThat(dave2.getName()).isEqualTo("David");
assertThat(dave2).isSameAs(dave1);
- // Check unadvised behaviour
+ // Check unadvised behavior
String str = "woierowijeiowiej";
assertThat(oom.echo(str)).isEqualTo(str);
diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java
index 97731324ab9..82c2a96e9ba 100644
--- a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java
+++ b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java
@@ -47,7 +47,7 @@ import static org.springframework.context.testfixture.cache.CacheTestUtils.asser
import static org.springframework.context.testfixture.cache.CacheTestUtils.assertCacheMiss;
/**
- * Provides various {@link CacheResolver} customisations scenario
+ * Provides various {@link CacheResolver} customizations scenario
*
* @author Stephane Nicoll
* @since 4.1
diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/AutowiredConfigurationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/AutowiredConfigurationTests.java
index 4c621ccd63b..8d3e29544b4 100644
--- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/AutowiredConfigurationTests.java
+++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/AutowiredConfigurationTests.java
@@ -36,7 +36,7 @@ import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.springframework.beans.testfixture.beans.Colour;
+import org.springframework.beans.testfixture.beans.Color;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
@@ -67,8 +67,8 @@ class AutowiredConfigurationTests {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
AutowiredConfigurationTests.class.getSimpleName() + ".xml", AutowiredConfigurationTests.class);
- assertThat(context.getBean("colour", Colour.class)).isEqualTo(Colour.RED);
- assertThat(context.getBean("testBean", TestBean.class).getName()).isEqualTo(Colour.RED.toString());
+ assertThat(context.getBean("color", Color.class)).isEqualTo(Color.RED);
+ assertThat(context.getBean("testBean", TestBean.class).getName()).isEqualTo(Color.RED.toString());
context.close();
}
@@ -77,7 +77,7 @@ class AutowiredConfigurationTests {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
AutowiredMethodConfig.class, ColorConfig.class);
- assertThat(context.getBean(Colour.class)).isEqualTo(Colour.RED);
+ assertThat(context.getBean(Color.class)).isEqualTo(Color.RED);
assertThat(context.getBean(TestBean.class).getName()).isEqualTo("RED-RED");
context.close();
}
@@ -87,7 +87,7 @@ class AutowiredConfigurationTests {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
OptionalAutowiredMethodConfig.class, ColorConfig.class);
- assertThat(context.getBean(Colour.class)).isEqualTo(Colour.RED);
+ assertThat(context.getBean(Color.class)).isEqualTo(Color.RED);
assertThat(context.getBean(TestBean.class).getName()).isEqualTo("RED-RED");
context.close();
}
@@ -97,7 +97,7 @@ class AutowiredConfigurationTests {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
OptionalAutowiredMethodConfig.class);
- assertThat(context.getBeansOfType(Colour.class)).isEmpty();
+ assertThat(context.getBeansOfType(Color.class)).isEmpty();
assertThat(context.getBean(TestBean.class).getName()).isEmpty();
context.close();
}
@@ -107,7 +107,7 @@ class AutowiredConfigurationTests {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
QualifiedAutowiredMethodConfig.class);
- assertThat(context.getBeansOfType(Colour.class)).isEmpty();
+ assertThat(context.getBeansOfType(Color.class)).isEmpty();
assertThat(context.getBean(TestBean.class).getName()).isEmpty();
context.close();
}
@@ -121,7 +121,7 @@ class AutowiredConfigurationTests {
ctx.registerBeanDefinition("config1", new RootBeanDefinition(AutowiredConstructorConfig.class));
ctx.registerBeanDefinition("config2", new RootBeanDefinition(ColorConfig.class));
ctx.refresh();
- assertThat(ctx.getBean(Colour.class)).isSameAs(ctx.getBean(AutowiredConstructorConfig.class).colour);
+ assertThat(ctx.getBean(Color.class)).isSameAs(ctx.getBean(AutowiredConstructorConfig.class).color);
ctx.close();
}
@@ -134,7 +134,7 @@ class AutowiredConfigurationTests {
ctx.registerBeanDefinition("config1", new RootBeanDefinition(ObjectFactoryConstructorConfig.class));
ctx.registerBeanDefinition("config2", new RootBeanDefinition(ColorConfig.class));
ctx.refresh();
- assertThat(ctx.getBean(Colour.class)).isSameAs(ctx.getBean(ObjectFactoryConstructorConfig.class).colour);
+ assertThat(ctx.getBean(Color.class)).isSameAs(ctx.getBean(ObjectFactoryConstructorConfig.class).color);
ctx.close();
}
@@ -147,7 +147,7 @@ class AutowiredConfigurationTests {
ctx.registerBeanDefinition("config1", new RootBeanDefinition(MultipleConstructorConfig.class));
ctx.registerBeanDefinition("config2", new RootBeanDefinition(ColorConfig.class));
ctx.refresh();
- assertThat(ctx.getBean(Colour.class)).isSameAs(ctx.getBean(MultipleConstructorConfig.class).colour);
+ assertThat(ctx.getBean(Color.class)).isSameAs(ctx.getBean(MultipleConstructorConfig.class).color);
ctx.close();
}
@@ -275,11 +275,11 @@ class AutowiredConfigurationTests {
static class AutowiredConfig {
@Autowired
- private Colour colour;
+ private Color color;
@Bean
public TestBean testBean() {
- return new TestBean(colour.toString());
+ return new TestBean(color.toString());
}
}
@@ -288,8 +288,8 @@ class AutowiredConfigurationTests {
static class AutowiredMethodConfig {
@Bean
- public TestBean testBean(Colour colour, List Default behaviour is to cache all views.
+ * Default behavior is to cache all views.
* @since 5.2
*/
public void setCacheFilter(CacheFilter cacheFilter) {
diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java
index 25ea888b007..9565da38083 100644
--- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java
+++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java
@@ -32,7 +32,7 @@ import org.dom4j.io.SAXReader;
import org.junit.jupiter.api.Test;
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
-import org.springframework.beans.testfixture.beans.Colour;
+import org.springframework.beans.testfixture.beans.Color;
import org.springframework.beans.testfixture.beans.Pet;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.validation.BeanPropertyBindingResult;
@@ -448,8 +448,8 @@ class CheckboxTagTests extends AbstractFormTagTests {
}
@Test
- void collectionOfColoursSelected() throws Exception {
- this.tag.setPath("otherColours");
+ void collectionOfColorsSelected() throws Exception {
+ this.tag.setPath("otherColors");
this.tag.setValue("RED");
int result = this.tag.doStartTag();
@@ -465,13 +465,13 @@ class CheckboxTagTests extends AbstractFormTagTests {
Element checkboxElement = document.getRootElement().elements().get(0);
assertThat(checkboxElement.getName()).isEqualTo("input");
assertThat(checkboxElement.attribute("type").getValue()).isEqualTo("checkbox");
- assertThat(checkboxElement.attribute("name").getValue()).isEqualTo("otherColours");
+ assertThat(checkboxElement.attribute("name").getValue()).isEqualTo("otherColors");
assertThat(checkboxElement.attribute("checked").getValue()).isEqualTo("checked");
}
@Test
- void collectionOfColoursNotSelected() throws Exception {
- this.tag.setPath("otherColours");
+ void collectionOfColorsNotSelected() throws Exception {
+ this.tag.setPath("otherColors");
this.tag.setValue("PURPLE");
int result = this.tag.doStartTag();
@@ -487,7 +487,7 @@ class CheckboxTagTests extends AbstractFormTagTests {
Element checkboxElement = document.getRootElement().elements().get(0);
assertThat(checkboxElement.getName()).isEqualTo("input");
assertThat(checkboxElement.attribute("type").getValue()).isEqualTo("checkbox");
- assertThat(checkboxElement.attribute("name").getValue()).isEqualTo("otherColours");
+ assertThat(checkboxElement.attribute("name").getValue()).isEqualTo("otherColors");
assertThat(checkboxElement.attribute("checked")).isNull();
}
@@ -660,10 +660,7 @@ class CheckboxTagTests extends AbstractFormTagTests {
@Override
protected TestBean createTestBean() {
- List colours = new ArrayList();
- colours.add(Colour.BLUE);
- colours.add(Colour.RED);
- colours.add(Colour.GREEN);
+ List colors = List.of(Color.BLUE, Color.RED, Color.GREEN);
List pets = new ArrayList();
pets.add(new Pet("Rudiger"));
@@ -685,7 +682,7 @@ class CheckboxTagTests extends AbstractFormTagTests {
this.bean.setSomeBoolean(Boolean.TRUE);
this.bean.setStringArray(new String[] {"bar", "foo"});
this.bean.setSomeIntegerArray(new Integer[] {2, 1});
- this.bean.setOtherColours(colours);
+ this.bean.setOtherColors(colors);
this.bean.setPets(pets);
this.bean.setSomeList(someList);
this.bean.setSomeMap(someMap);
diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java
index f183fe57097..4472e740e01 100644
--- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java
+++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java
@@ -35,7 +35,7 @@ import org.dom4j.io.SAXReader;
import org.junit.jupiter.api.Test;
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
-import org.springframework.beans.testfixture.beans.Colour;
+import org.springframework.beans.testfixture.beans.Color;
import org.springframework.beans.testfixture.beans.Pet;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.format.Formatter;
@@ -742,10 +742,7 @@ public class CheckboxesTagTests extends AbstractFormTagTests {
@Override
protected TestBean createTestBean() {
- List colours = new ArrayList();
- colours.add(Colour.BLUE);
- colours.add(Colour.RED);
- colours.add(Colour.GREEN);
+ List colors = List.of(Color.BLUE, Color.RED, Color.GREEN);
List pets = new ArrayList();
pets.add(new Pet("Rudiger"));
@@ -764,7 +761,7 @@ public class CheckboxesTagTests extends AbstractFormTagTests {
this.bean.setSomeBoolean(Boolean.TRUE);
this.bean.setStringArray(new String[] {"bar", "foo"});
this.bean.setSomeIntegerArray(new Integer[] {2, 1});
- this.bean.setOtherColours(colours);
+ this.bean.setOtherColors(colors);
this.bean.setPets(pets);
this.bean.setSomeSet(someObjects);
List list = new ArrayList();
diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java
index 279393f19b7..d2732a42ee6 100644
--- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java
+++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java
@@ -28,7 +28,7 @@ import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.Test;
import org.springframework.beans.propertyeditors.StringArrayPropertyEditor;
-import org.springframework.beans.testfixture.beans.Colour;
+import org.springframework.beans.testfixture.beans.Color;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.util.StringUtils;
import org.springframework.validation.BeanPropertyBindingResult;
@@ -483,7 +483,7 @@ class OptionTagTests extends AbstractHtmlElementTagTests {
protected void extendRequest(MockHttpServletRequest request) {
TestBean bean = new TestBean();
bean.setName("foo");
- bean.setFavouriteColour(Colour.GREEN);
+ bean.setFavouriteColor(Color.GREEN);
bean.setStringArray(ARRAY);
bean.setSpouse(new TestBean("Sally"));
bean.setSomeNumber(Float.valueOf("12.34"));
diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java
index cd0764f656c..5b1e5b09167 100644
--- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java
+++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java
@@ -35,7 +35,7 @@ import org.dom4j.io.SAXReader;
import org.junit.jupiter.api.Test;
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
-import org.springframework.beans.testfixture.beans.Colour;
+import org.springframework.beans.testfixture.beans.Color;
import org.springframework.beans.testfixture.beans.Pet;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.validation.BeanPropertyBindingResult;
@@ -596,9 +596,9 @@ public class RadioButtonsTagTests extends AbstractFormTagTests {
@Override
protected TestBean createTestBean() {
List colours = new ArrayList();
- colours.add(Colour.BLUE);
- colours.add(Colour.RED);
- colours.add(Colour.GREEN);
+ colours.add(Color.BLUE);
+ colours.add(Color.RED);
+ colours.add(Color.GREEN);
List pets = new ArrayList();
pets.add(new Pet("Rudiger"));
@@ -613,7 +613,7 @@ public class RadioButtonsTagTests extends AbstractFormTagTests {
this.bean.setSomeBoolean(Boolean.TRUE);
this.bean.setStringArray(new String[] {"bar", "foo"});
this.bean.setSomeIntegerArray(new Integer[] {2, 1});
- this.bean.setOtherColours(colours);
+ this.bean.setOtherColors(colours);
this.bean.setPets(pets);
List list = new ArrayList();
list.add("foo");
From 5eb0e99d5842b6bbdb99d06d50eba7b6ba5c700d Mon Sep 17 00:00:00 2001
From: Sam Brannen <104798+sbrannen@users.noreply.github.com>
Date: Sun, 15 Mar 2026 15:32:00 +0100
Subject: [PATCH 2/2] Fix common typos and grammatical mistakes
Closes gh-36471
---
framework-docs/modules/ROOT/pages/core/aot.adoc | 2 +-
.../annotation-config/autowired-qualifiers.adoc | 2 +-
.../language-ref/properties-arrays.adoc | 2 +-
.../ROOT/pages/core/validation/data-binding.adoc | 16 ++++++++--------
.../testcontext-framework/bootstrapping.adoc | 2 +-
.../pages/web/webmvc-view/mvc-freemarker.adoc | 2 +-
.../mvc-controller/ann-exceptionhandler.adoc | 2 +-
.../support/ConstructorResolverAotTests.java | 2 +-
.../mail/javamail/MimeMessageHelper.java | 4 ++--
.../springframework/context/annotation/Bean.java | 2 +-
.../context/support/BeanDefinitionDsl.kt | 4 ++--
.../springframework/core/convert/Property.java | 4 ++--
.../support/GenericConversionServiceTests.java | 8 ++++----
.../springframework/expression/TypeLocator.java | 2 +-
.../spel/support/ReflectiveIndexAccessor.java | 2 +-
.../expression/spel/SetValueTests.java | 4 ++--
.../spel/support/ReflectionHelperTests.java | 6 +++---
.../AbstractDataFieldMaxValueIncrementer.java | 4 ++--
.../jdbc/object/StoredProcedureTests.java | 2 +-
...DestinationPatternsMessageConditionTests.java | 2 +-
.../test/context/TestContextBootstrapper.java | 2 +-
.../springframework/http/HttpHeadersTests.java | 4 ++--
.../web/util/pattern/PathPatternTests.java | 8 ++++----
.../web/reactive/result/view/RedirectView.java | 2 +-
.../ConvertingEncoderDecoderSupport.java | 2 +-
25 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/framework-docs/modules/ROOT/pages/core/aot.adoc b/framework-docs/modules/ROOT/pages/core/aot.adoc
index 8a3f9113e17..b16ac2728da 100644
--- a/framework-docs/modules/ROOT/pages/core/aot.adoc
+++ b/framework-docs/modules/ROOT/pages/core/aot.adoc
@@ -378,7 +378,7 @@ The container also supports creating a bean with {spring-framework-api}++/beans/
. The custom arguments require dynamic introspection of a matching constructor or factory method.
Those arguments cannot be detected by AOT, so the necessary reflection hints will have to be provided manually.
-. By-passing the instance supplier means that all other optimizations after creation are skipped as well.
+. Bypassing the instance supplier means that all other optimizations after creation are skipped as well.
For instance, autowiring on fields and methods will be skipped as they are handled in the instance supplier.
Rather than having prototype-scoped beans created with custom arguments, we recommend a manual factory pattern where a bean is responsible for the creation of the instance.
diff --git a/framework-docs/modules/ROOT/pages/core/beans/annotation-config/autowired-qualifiers.adoc b/framework-docs/modules/ROOT/pages/core/beans/annotation-config/autowired-qualifiers.adoc
index d8c24257da2..08dd2c5fbe9 100644
--- a/framework-docs/modules/ROOT/pages/core/beans/annotation-config/autowired-qualifiers.adoc
+++ b/framework-docs/modules/ROOT/pages/core/beans/annotation-config/autowired-qualifiers.adoc
@@ -274,7 +274,7 @@ Kotlin::
Next, you can provide the information for the candidate bean definitions. You can add
` This was Spring 1.0's default behavior. It is known to work properly
* on Outlook. However, other mail clients tend to misinterpret inline
@@ -123,7 +123,7 @@ public class MimeMessageHelper {
/**
* Constant indicating a multipart message with a single root multipart
- * element of type "related". Texts, inline elements and attachements
+ * element of type "related". Texts, inline elements and attachments
* will all get added to that root element.
* This was the default behavior from Spring 1.1 up to 1.2 final.
* This is the "Microsoft multipart mode", as natively sent by Outlook.
diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Bean.java b/spring-context/src/main/java/org/springframework/context/annotation/Bean.java
index 22651d14b04..693cb7dfc2f 100644
--- a/spring-context/src/main/java/org/springframework/context/annotation/Bean.java
+++ b/spring-context/src/main/java/org/springframework/context/annotation/Bean.java
@@ -206,7 +206,7 @@ import org.springframework.core.annotation.AliasFor;
* ({@code BPP}) types. Because {@code BPP} objects must be instantiated early in the container
* lifecycle, a non-static {@code @Bean} method that returns a {@code BPP} will cause eager
* initialization of its declaring {@code @Configuration} class, which can make other beans in the
- * {@code @Configuration} class (as well as depencencies of those beans) ineligible for full
+ * {@code @Configuration} class (as well as dependencies of those beans) ineligible for full
* post-processing. To avoid these lifecycle issues, mark {@code BPP}-returning {@code @Bean}
* methods as {@code static}. For example:
*
diff --git a/spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt b/spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt
index cce409098a4..2738460a475 100644
--- a/spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt
+++ b/spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt
@@ -78,7 +78,7 @@ fun beans(init: BeanDefinitionDsl.() -> Unit) = BeanDefinitionDsl(init)
* Class implementing functional bean definition Kotlin DSL.
*
* @constructor Create a new bean definition DSL.
- * @param condition the predicate to fulfill in order to take in account the inner
+ * @param condition the predicate to fulfill in order to take into account the inner
* bean definition block
* @author Sebastien Deleuze
* @since 5.0
@@ -1200,7 +1200,7 @@ open class BeanDefinitionDsl internal constructor (private val init: BeanDefinit
/**
* Take in account bean definitions enclosed in the provided lambda only when the
* specified environment-based predicate is true.
- * @param condition the predicate to fulfill in order to take in account the inner
+ * @param condition the predicate to fulfill in order to take into account the inner
* bean definition block
*/
fun environment(condition: ConfigurableEnvironment.() -> Boolean,
diff --git a/spring-core/src/main/java/org/springframework/core/convert/Property.java b/spring-core/src/main/java/org/springframework/core/convert/Property.java
index 7218fbdea03..09bf46f46bb 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/Property.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/Property.java
@@ -158,7 +158,7 @@ public final class Property {
return StringUtils.uncapitalize(this.writeMethod.getName().substring(index));
}
else {
- throw new IllegalStateException("Property is neither readable nor writeable");
+ throw new IllegalStateException("Property is neither readable nor writable");
}
}
@@ -167,7 +167,7 @@ public final class Property {
MethodParameter write = resolveWriteMethodParameter();
if (write == null) {
if (read == null) {
- throw new IllegalStateException("Property is neither readable nor writeable");
+ throw new IllegalStateException("Property is neither readable nor writable");
}
return read;
}
diff --git a/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java b/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java
index b87b50b465e..3108ac78a05 100644
--- a/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java
+++ b/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java
@@ -256,7 +256,7 @@ class GenericConversionServiceTests {
void interfaceToString() {
conversionService.addConverter(new MyBaseInterfaceToStringConverter());
conversionService.addConverter(new ObjectToStringConverter());
- Object converted = conversionService.convert(new MyInterfaceImplementer(), String.class);
+ Object converted = conversionService.convert(new MyInterfaceImplementor(), String.class);
assertThat(converted).isEqualTo("RESULT");
}
@@ -264,7 +264,7 @@ class GenericConversionServiceTests {
void interfaceArrayToStringArray() {
conversionService.addConverter(new MyBaseInterfaceToStringConverter());
conversionService.addConverter(new ArrayToArrayConverter(conversionService));
- String[] converted = conversionService.convert(new MyInterface[] {new MyInterfaceImplementer()}, String[].class);
+ String[] converted = conversionService.convert(new MyInterface[] {new MyInterfaceImplementor()}, String[].class);
assertThat(converted[0]).isEqualTo("RESULT");
}
@@ -272,7 +272,7 @@ class GenericConversionServiceTests {
void objectArrayToStringArray() {
conversionService.addConverter(new MyBaseInterfaceToStringConverter());
conversionService.addConverter(new ArrayToArrayConverter(conversionService));
- String[] converted = conversionService.convert(new MyInterfaceImplementer[] {new MyInterfaceImplementer()}, String[].class);
+ String[] converted = conversionService.convert(new MyInterfaceImplementor[] {new MyInterfaceImplementor()}, String[].class);
assertThat(converted[0]).isEqualTo("RESULT");
}
@@ -631,7 +631,7 @@ class GenericConversionServiceTests {
}
- private static class MyInterfaceImplementer implements MyInterface {
+ private static class MyInterfaceImplementor implements MyInterface {
}
diff --git a/spring-expression/src/main/java/org/springframework/expression/TypeLocator.java b/spring-expression/src/main/java/org/springframework/expression/TypeLocator.java
index e831adcce98..4d3570563f6 100644
--- a/spring-expression/src/main/java/org/springframework/expression/TypeLocator.java
+++ b/spring-expression/src/main/java/org/springframework/expression/TypeLocator.java
@@ -17,7 +17,7 @@
package org.springframework.expression;
/**
- * Implementers of this interface are expected to be able to locate types.
+ * Implementors of this interface are expected to be able to locate types.
*
* They may use a custom {@link ClassLoader} and/or deal with common package
* prefixes (for example, {@code java.lang}) however they wish.
diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveIndexAccessor.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveIndexAccessor.java
index 46daef1af86..f5f181b7ada 100644
--- a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveIndexAccessor.java
+++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveIndexAccessor.java
@@ -45,7 +45,7 @@ import org.springframework.util.ReflectionUtils;
*
* {@code ReflectiveIndexAccessor} also implements {@link CompilableIndexAccessor}
* in order to support compilation to bytecode for read access. Note, however,
- * that the configured read-method must be invokable via a public class or public
+ * that the configured read-method must be invocable via a public class or public
* interface for compilation to succeed.
*
* > colours) {
- if (colour.isEmpty() && colours.isEmpty()) {
+ public TestBean testBean(Optional
> colors) {
+ if (color.isEmpty() && colors.isEmpty()) {
return new TestBean("");
}
else {
- return new TestBean(colour.get() + "-" + colours.get().get(0).toString());
+ return new TestBean(color.get() + "-" + colors.get().get(0).toString());
}
}
}
@@ -314,9 +314,9 @@ class AutowiredConfigurationTests {
@Bean
@Qualifier("testBean")
- public TestBean testBean(Optional
> colours) {
- if (!colour.isEmpty() || !colours.isEmpty()) {
- throw new IllegalStateException("Unexpected match: " + colour + " " + colours);
+ public TestBean testBean(Optional
> colors) {
+ if (!color.isEmpty() || !colors.isEmpty()) {
+ throw new IllegalStateException("Unexpected match: " + color + " " + colors);
}
return new TestBean("");
}
@@ -331,11 +331,11 @@ class AutowiredConfigurationTests {
@Configuration
static class AutowiredConstructorConfig {
- Colour colour;
+ Color color;
// @Autowired
- AutowiredConstructorConfig(Colour colour) {
- this.colour = colour;
+ AutowiredConstructorConfig(Color color) {
+ this.color = color;
}
}
@@ -343,11 +343,11 @@ class AutowiredConfigurationTests {
@Configuration
static class ObjectFactoryConstructorConfig {
- Colour colour;
+ Color color;
// @Autowired
- ObjectFactoryConstructorConfig(ObjectFactory
`).
* `attributes`: An additional string of arbitrary tags or text to be included within
diff --git a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-controller/ann-exceptionhandler.adoc b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-controller/ann-exceptionhandler.adoc
index 545c158678d..49c0fed3a5d 100644
--- a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-controller/ann-exceptionhandler.adoc
+++ b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-controller/ann-exceptionhandler.adoc
@@ -188,7 +188,7 @@ the content negotiation during the error handling phase will decide which conten
| `View`
| A `View` instance to use for rendering together with the implicit model -- determined
through command objects and `@ModelAttribute` methods. The handler method may also
- programmatically enrich the model by declaring a `Model` argument (descried earlier).
+ programmatically enrich the model by declaring a `Model` argument (described earlier).
| `java.util.Map`, `org.springframework.ui.Model`
| Attributes to be added to the implicit model with the view name implicitly determined
diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/ConstructorResolverAotTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/ConstructorResolverAotTests.java
index 86443025f1e..7a229679daa 100644
--- a/spring-beans/src/test/java/org/springframework/beans/factory/support/ConstructorResolverAotTests.java
+++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/ConstructorResolverAotTests.java
@@ -600,7 +600,7 @@ class ConstructorResolverAotTests {
}
}
- @SuppressWarnings("unnused")
+ @SuppressWarnings("unused")
static class ConstructorPrimitiveFallback {
public ConstructorPrimitiveFallback(boolean useDefaultExecutor) {
diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java
index abb1bc445c1..30f3e2e673b 100644
--- a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java
+++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java
@@ -113,7 +113,7 @@ public class MimeMessageHelper {
/**
* Constant indicating a multipart message with a single root multipart
- * element of type "mixed". Texts, inline elements and attachements
+ * element of type "mixed". Texts, inline elements and attachments
* will all get added to that root element.
* Example
diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java
index 06f436dd0af..be538450a1a 100644
--- a/spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java
+++ b/spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java
@@ -310,7 +310,7 @@ class SetValueTests extends AbstractExpressionTests {
if (DEBUG) {
SpelUtilities.printAbstractSyntaxTree(System.out, e);
}
- assertThat(e.isWritable(context)).as("Expression is not writeable but should be").isTrue();
+ assertThat(e.isWritable(context)).as("Expression is not writable but should be").isTrue();
e.setValue(context, value);
assertThat(e.getValue(context, expectedType)).as("Retrieved value was not equal to set value").isEqualTo(value);
}
@@ -330,7 +330,7 @@ class SetValueTests extends AbstractExpressionTests {
if (DEBUG) {
SpelUtilities.printAbstractSyntaxTree(System.out, e);
}
- assertThat(e.isWritable(context)).as("Expression is not writeable but should be").isTrue();
+ assertThat(e.isWritable(context)).as("Expression is not writable but should be").isTrue();
e.setValue(context, value);
assertThat(expectedValue).isEqualTo(e.getValue(context));
}
diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/support/ReflectionHelperTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/support/ReflectionHelperTests.java
index 04e97a67e1a..ed95ac45fba 100644
--- a/spring-expression/src/test/java/org/springframework/expression/spel/support/ReflectionHelperTests.java
+++ b/spring-expression/src/test/java/org/springframework/expression/spel/support/ReflectionHelperTests.java
@@ -186,11 +186,11 @@ class ReflectionHelperTests extends AbstractExpressionTests {
// Passing (Super) on call to (Sub[]) is not a match
checkMatchVarargs(new Class>[] {Super.class}, new Class>[] {Sub[].class}, tc, null);
- checkMatchVarargs(new Class>[] {Unconvertable.class, String.class}, new Class>[] {Sub.class, Super[].class}, tc, null);
+ checkMatchVarargs(new Class>[] {Unconvertible.class, String.class}, new Class>[] {Sub.class, Super[].class}, tc, null);
checkMatchVarargs(new Class>[] {Integer.class, Integer.class, String.class}, new Class>[] {String.class, String.class, Super[].class}, tc, null);
- checkMatchVarargs(new Class>[] {Unconvertable.class, String.class}, new Class>[] {Sub.class, Super[].class}, tc, null);
+ checkMatchVarargs(new Class>[] {Unconvertible.class, String.class}, new Class>[] {Sub.class, Super[].class}, tc, null);
checkMatchVarargs(new Class>[] {Integer.class, Integer.class, String.class}, new Class>[] {String.class, String.class, Super[].class}, tc, null);
@@ -519,7 +519,7 @@ class ReflectionHelperTests extends AbstractExpressionTests {
}
- static class Unconvertable {
+ static class Unconvertible {
}
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java
index db1504fa8bc..2792d23dda5 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java
@@ -41,7 +41,7 @@ public abstract class AbstractDataFieldMaxValueIncrementer implements DataFieldM
@SuppressWarnings("NullAway.Init")
private String incrementerName;
- /** The length to which a string result should be pre-pended with zeroes. */
+ /** The length to which a string result should be prepended with zeroes. */
protected int paddingLength = 0;
@@ -96,7 +96,7 @@ public abstract class AbstractDataFieldMaxValueIncrementer implements DataFieldM
/**
* Set the padding length, i.e. the length to which a string result
- * should be pre-pended with zeroes.
+ * should be prepended with zeroes.
*/
public void setPaddingLength(int paddingLength) {
this.paddingLength = paddingLength;
diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/object/StoredProcedureTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/object/StoredProcedureTests.java
index e199f36064b..bb516eec552 100644
--- a/spring-jdbc/src/test/java/org/springframework/jdbc/object/StoredProcedureTests.java
+++ b/spring-jdbc/src/test/java/org/springframework/jdbc/object/StoredProcedureTests.java
@@ -318,7 +318,7 @@ class StoredProcedureTests {
List