diff --git a/spring-context/src/test/java/org/springframework/validation/DataBinderConstructTests.java b/spring-context/src/test/java/org/springframework/validation/DataBinderConstructTests.java index c4ee77a6f9..ccdd1f6b53 100644 --- a/spring-context/src/test/java/org/springframework/validation/DataBinderConstructTests.java +++ b/spring-context/src/test/java/org/springframework/validation/DataBinderConstructTests.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. @@ -225,7 +225,7 @@ class DataBinderConstructTests { } - private static class NestedDataClass { + static class NestedDataClass { private final String param1; diff --git a/spring-core/src/test/java/org/springframework/aot/hint/annotation/RegisterReflectionReflectiveProcessorTests.java b/spring-core/src/test/java/org/springframework/aot/hint/annotation/RegisterReflectionReflectiveProcessorTests.java index ba230f335f..26f9e7f0da 100644 --- a/spring-core/src/test/java/org/springframework/aot/hint/annotation/RegisterReflectionReflectiveProcessorTests.java +++ b/spring-core/src/test/java/org/springframework/aot/hint/annotation/RegisterReflectionReflectiveProcessorTests.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. @@ -180,10 +180,7 @@ class RegisterReflectionReflectiveProcessorTests { @RegisterReflection(memberCategories = MemberCategory.INVOKE_DECLARED_CONSTRUCTORS) static class AnnotatedSimplePojo { - private String test; - AnnotatedSimplePojo(String test) { - this.test = test; } } diff --git a/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java b/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java index 06dfcf4045..6f909c9fea 100644 --- a/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java +++ b/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.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. @@ -405,7 +405,10 @@ class BridgeMethodResolverTests { } - public abstract static class SubBar extends InterBar { + public abstract static class SubBar extends InterBar { + } + + public interface StringProducer extends CharSequence { } 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 818bd021b9..b5155635dc 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 @@ -570,12 +570,12 @@ class GenericConversionServiceTests { conversionService.addConverter(new StringListToAListConverter()); conversionService.addConverter(new StringListToBListConverter()); - List aList = (List) conversionService.convert(List.of("foo"), + List aList = (List) conversionService.convert(List.of("foo"), TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(String.class)), TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(ARaw.class))); assertThat(aList).allMatch(e -> e instanceof ARaw); - List bList = (List) conversionService.convert(List.of("foo"), + List bList = (List) conversionService.convert(List.of("foo"), TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(String.class)), TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(BRaw.class))); assertThat(bList).allMatch(e -> e instanceof BRaw); @@ -945,9 +945,11 @@ class GenericConversionServiceTests { private static class GenericBaseClass { } + @SuppressWarnings("rawtypes") private static class ARaw extends GenericBaseClass { } + @SuppressWarnings("rawtypes") private static class BRaw extends GenericBaseClass { } diff --git a/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java index 049d4a59cb..6bf41469e6 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.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. @@ -330,7 +330,7 @@ class WebExchangeDataBinderTests { } - private static class MultipartDataClass { + static class MultipartDataClass { private final FilePart part; @@ -351,4 +351,5 @@ class WebExchangeDataBinderTests { return nullablePart; } } + }