Fix test compilation warnings

Closes gh-30753
This commit is contained in:
Sébastien Deleuze 2023-06-26 12:03:07 +02:00
parent acb786d359
commit 7137b22e6b
4 changed files with 4 additions and 4 deletions

View File

@ -10,4 +10,5 @@ dependencies {
testImplementation(testFixtures(project(":spring-core")))
testFixturesImplementation(testFixtures(project(":spring-beans")))
testFixturesImplementation(testFixtures(project(":spring-core")))
testFixturesImplementation("com.google.code.findbugs:jsr305")
}

View File

@ -14,4 +14,5 @@ dependencies {
testImplementation("jakarta.annotation:jakarta.annotation-api")
testFixturesApi("org.junit.jupiter:junit-jupiter-api")
testFixturesImplementation("org.assertj:assertj-core")
testFixturesImplementation("com.google.code.findbugs:jsr305")
}

View File

@ -1994,6 +1994,7 @@ abstract class AbstractPropertyAccessorTests {
}
@SuppressWarnings("unchecked")
static class Spr13837Bean implements Spr13837 {
protected Integer something;
@ -2004,7 +2005,6 @@ abstract class AbstractPropertyAccessorTests {
}
@Override
@SuppressWarnings("unchecked")
public Spr13837Bean setSomething(final Integer something) {
this.something = something;
return this;

View File

@ -3190,6 +3190,7 @@ class DefaultListableBeanFactoryTests {
}
@SuppressWarnings({ "unchecked", "rawtypes" })
private static class CustomTypeConverter implements TypeConverter {
private final NumberFormat numberFormat;
@ -3199,7 +3200,6 @@ class DefaultListableBeanFactoryTests {
}
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public Object convertIfNecessary(Object value, @Nullable Class requiredType) {
if (value instanceof String && Float.class.isAssignableFrom(requiredType)) {
try {
@ -3218,13 +3218,11 @@ class DefaultListableBeanFactoryTests {
}
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public Object convertIfNecessary(Object value, @Nullable Class requiredType, @Nullable MethodParameter methodParam) {
return convertIfNecessary(value, requiredType);
}
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public Object convertIfNecessary(Object value, @Nullable Class requiredType, @Nullable Field field) {
return convertIfNecessary(value, requiredType);
}