diff --git a/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java b/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java index 263558009cd1..7744ba60abc1 100644 --- a/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java +++ b/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java @@ -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 static void rejectIfEmptyOrWhitespace( 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); } } diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationBackCompatibilityTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationBackCompatibilityTests.java index 9ca47d7f6351..434bfe7c9312 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationBackCompatibilityTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationBackCompatibilityTests.java @@ -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 @@ class AnnotationBackCompatibilityTests { @Test - void multiplRoutesToMetaAnnotation() { + void multipleRoutesToMetaAnnotation() { Class source = WithMetaMetaTestAnnotation1AndMetaTestAnnotation2.class; // Merged annotation chooses lowest depth MergedAnnotation mergedAnnotation = MergedAnnotations.from(source).get(TestAnnotation.class); diff --git a/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java index 65022cb36b82..dc053a54b966 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java @@ -984,7 +984,7 @@ void getDirectFromClassFavorsMoreLocallyDeclaredComposedAnnotationsOverInherited } @Test - void getDirectFromClassgetDirectFromClassMetaMetaAnnotatedClass() { + void getDirectFromClassGetDirectFromClassMetaMetaAnnotatedClass() { MergedAnnotation annotation = MergedAnnotations.from( MetaMetaAnnotatedClass.class, SearchStrategy.TYPE_HIERARCHY).get(Component.class); assertThat(annotation.getString("value")).isEqualTo("meta2"); diff --git a/spring-core/src/test/java/org/springframework/core/convert/converter/ConverterTests.java b/spring-core/src/test/java/org/springframework/core/convert/converter/ConverterTests.java index 65d519f54087..f72f2069cd31 100644 --- a/spring-core/src/test/java/org/springframework/core/convert/converter/ConverterTests.java +++ b/spring-core/src/test/java/org/springframework/core/convert/converter/ConverterTests.java @@ -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 @@ void andThenWhenGivenConverterThenComposesInOrder() { } @Test - void andThenCanConvertfromDifferentSourceType() { + void andThenCanConvertFromDifferentSourceType() { Converter length = String::length; assertThat(length.andThen(this.moduloTwo).convert("example")).isEqualTo(1); assertThat(length.andThen(this.addOne).convert("example")).isEqualTo(8); diff --git a/spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java b/spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java index e1352e5eeceb..6de3602cbfdc 100644 --- a/spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java +++ b/spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java @@ -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 @@ void patternComparator() { 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 @@ void patternComparator() { 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); diff --git a/spring-core/src/test/kotlin/org/springframework/core/BridgeMethodResolverKotlinTests.kt b/spring-core/src/test/kotlin/org/springframework/core/BridgeMethodResolverKotlinTests.kt index bb94dd3867fe..f1c8eabc1e96 100644 --- a/spring-core/src/test/kotlin/org/springframework/core/BridgeMethodResolverKotlinTests.kt +++ b/spring-core/src/test/kotlin/org/springframework/core/BridgeMethodResolverKotlinTests.kt @@ -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 /** * Kotlin tests for [BridgeMethodResolver]. * - * @author Sebastien Deleuzes + * @author Sebastien Deleuze */ class BridgeMethodResolverKotlinTests { diff --git a/spring-web/src/test/java/org/springframework/http/converter/json/SpringHandlerInstantiatorTests.java b/spring-web/src/test/java/org/springframework/http/converter/json/SpringHandlerInstantiatorTests.java index 3c9a9b4e5b2b..a042df37959f 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/json/SpringHandlerInstantiatorTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/json/SpringHandlerInstantiatorTests.java @@ -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 @@ void autowiredKeyDeserializer() throws IOException { } @Test - void applicationContextAwaretypeResolverBuilder() throws JsonProcessingException { + void applicationContextAwareTypeResolverBuilder() throws JsonProcessingException { this.objectMapper.writeValueAsString(new Group()); assertThat(CustomTypeResolverBuilder.isAutowiredFiledInitialized).isTrue(); }