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

(cherry picked from commit 17699103dc)
This commit is contained in:
Sam Brannen
2026-03-15 15:22:21 +01:00
parent 10faa7fdff
commit 0c4ed55fd2
35 changed files with 115 additions and 135 deletions
@@ -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;
@@ -447,8 +447,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();
@@ -464,13 +464,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();
@@ -486,7 +486,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();
}
@@ -659,10 +659,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"));
@@ -684,7 +681,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);
@@ -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;
@@ -741,10 +741,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"));
@@ -763,7 +760,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();
@@ -27,7 +27,7 @@ import jakarta.servlet.jsp.tagext.Tag;
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.lang.Nullable;
import org.springframework.util.StringUtils;
@@ -482,7 +482,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"));
@@ -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;
@@ -595,9 +595,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"));
@@ -612,7 +612,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");