Browse Source

Fix typos

Closes gh-34876

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
pull/35405/head
Tran Ngoc Nhan 7 months ago committed by rstoyanchev
parent
commit
3f0892b42c
  1. 4
      spring-context/src/main/java/org/springframework/validation/ValidationUtils.java
  2. 4
      spring-core/src/test/java/org/springframework/core/annotation/AnnotationBackCompatibilityTests.java
  3. 2
      spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java
  4. 4
      spring-core/src/test/java/org/springframework/core/convert/converter/ConverterTests.java
  5. 10
      spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java
  6. 4
      spring-core/src/test/kotlin/org/springframework/core/BridgeMethodResolverKotlinTests.kt
  7. 4
      spring-web/src/test/java/org/springframework/http/converter/json/SpringHandlerInstantiatorTests.java

4
spring-context/src/main/java/org/springframework/validation/ValidationUtils.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -250,7 +250,7 @@ public abstract class ValidationUtils { @@ -250,7 +250,7 @@ public abstract class ValidationUtils {
Assert.notNull(errors, "Errors object must not be null");
Object value = errors.getFieldValue(field);
if (value == null ||!StringUtils.hasText(value.toString())) {
if (value == null || !StringUtils.hasText(value.toString())) {
errors.rejectValue(field, errorCode, errorArgs, defaultMessage);
}
}

4
spring-core/src/test/java/org/springframework/core/annotation/AnnotationBackCompatibilityTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat;
class AnnotationBackCompatibilityTests {
@Test
void multiplRoutesToMetaAnnotation() {
void multipleRoutesToMetaAnnotation() {
Class<?> source = WithMetaMetaTestAnnotation1AndMetaTestAnnotation2.class;
// Merged annotation chooses lowest depth
MergedAnnotation<TestAnnotation> mergedAnnotation = MergedAnnotations.from(source).get(TestAnnotation.class);

2
spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java

@ -983,7 +983,7 @@ class MergedAnnotationsTests { @@ -983,7 +983,7 @@ class MergedAnnotationsTests {
}
@Test
void getDirectFromClassgetDirectFromClassMetaMetaAnnotatedClass() {
void getDirectFromClassGetDirectFromClassMetaMetaAnnotatedClass() {
MergedAnnotation<?> annotation = MergedAnnotations.from(
MetaMetaAnnotatedClass.class, SearchStrategy.TYPE_HIERARCHY).get(Component.class);
assertThat(annotation.getString("value")).isEqualTo("meta2");

4
spring-core/src/test/java/org/springframework/core/convert/converter/ConverterTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -46,7 +46,7 @@ class ConverterTests { @@ -46,7 +46,7 @@ class ConverterTests {
}
@Test
void andThenCanConvertfromDifferentSourceType() {
void andThenCanConvertFromDifferentSourceType() {
Converter<String, Integer> length = String::length;
assertThat(length.andThen(this.moduloTwo).convert("example")).isEqualTo(1);
assertThat(length.andThen(this.addOne).convert("example")).isEqualTo(8);

10
spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -491,8 +491,8 @@ class AntPathMatcherTests { @@ -491,8 +491,8 @@ class AntPathMatcherTests {
assertThat(comparator.compare("/hotels/{hotel}/bookings/{booking}", "/hotels/{hotel}/booking")).isEqualTo(1);
// SPR-10550
assertThat(comparator.compare("/hotels/{hotel}/bookings/{booking}/cutomers/{customer}", "/**")).isEqualTo(-1);
assertThat(comparator.compare("/**", "/hotels/{hotel}/bookings/{booking}/cutomers/{customer}")).isEqualTo(1);
assertThat(comparator.compare("/hotels/{hotel}/bookings/{booking}/customers/{customer}", "/**")).isEqualTo(-1);
assertThat(comparator.compare("/**", "/hotels/{hotel}/bookings/{booking}/customers/{customer}")).isEqualTo(1);
assertThat(comparator.compare("/**", "/**")).isEqualTo(0);
assertThat(comparator.compare("/hotels/{hotel}", "/hotels/*")).isEqualTo(-1);
@ -505,8 +505,8 @@ class AntPathMatcherTests { @@ -505,8 +505,8 @@ class AntPathMatcherTests {
assertThat(comparator.compare("/hotels/{hotel}", "/hotels/{hotel}.*")).isEqualTo(2);
// SPR-6741
assertThat(comparator.compare("/hotels/{hotel}/bookings/{booking}/cutomers/{customer}", "/hotels/**")).isEqualTo(-1);
assertThat(comparator.compare("/hotels/**", "/hotels/{hotel}/bookings/{booking}/cutomers/{customer}")).isEqualTo(1);
assertThat(comparator.compare("/hotels/{hotel}/bookings/{booking}/customers/{customer}", "/hotels/**")).isEqualTo(-1);
assertThat(comparator.compare("/hotels/**", "/hotels/{hotel}/bookings/{booking}/customers/{customer}")).isEqualTo(1);
assertThat(comparator.compare("/hotels/foo/bar/**", "/hotels/{hotel}")).isEqualTo(1);
assertThat(comparator.compare("/hotels/{hotel}", "/hotels/foo/bar/**")).isEqualTo(-1);

4
spring-core/src/test/kotlin/org/springframework/core/BridgeMethodResolverKotlinTests.kt

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test
/**
* Kotlin tests for [BridgeMethodResolver].
*
* @author Sebastien Deleuzes
* @author Sebastien Deleuze
*/
class BridgeMethodResolverKotlinTests {

4
spring-web/src/test/java/org/springframework/http/converter/json/SpringHandlerInstantiatorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -103,7 +103,7 @@ class SpringHandlerInstantiatorTests { @@ -103,7 +103,7 @@ class SpringHandlerInstantiatorTests {
}
@Test
void applicationContextAwaretypeResolverBuilder() throws JsonProcessingException {
void applicationContextAwareTypeResolverBuilder() throws JsonProcessingException {
this.objectMapper.writeValueAsString(new Group());
assertThat(CustomTypeResolverBuilder.isAutowiredFiledInitialized).isTrue();
}

Loading…
Cancel
Save