Browse Source

Add nullability annotations to tests in module/spring-boot-jms

See gh-47263
pull/47415/head
Moritz Halbritter 2 months ago
parent
commit
49c7546662
  1. 4
      module/spring-boot-jms/build.gradle
  2. 4
      module/spring-boot-jms/src/test/java/org/springframework/boot/jms/ConnectionFactoryUnwrapperTests.java

4
module/spring-boot-jms/build.gradle

@ -48,3 +48,7 @@ dependencies { @@ -48,3 +48,7 @@ dependencies {
testRuntimeOnly("ch.qos.logback:logback-classic")
}
tasks.named("compileTestJava") {
options.nullability.checking = "tests"
}

4
module/spring-boot-jms/src/test/java/org/springframework/boot/jms/ConnectionFactoryUnwrapperTests.java

@ -137,7 +137,9 @@ class ConnectionFactoryUnwrapperTests { @@ -137,7 +137,9 @@ class ConnectionFactoryUnwrapperTests {
}
private ConnectionFactory unwrap(ConnectionFactory connectionFactory) {
return ConnectionFactoryUnwrapper.unwrap(connectionFactory);
ConnectionFactory unwrapped = ConnectionFactoryUnwrapper.unwrap(connectionFactory);
assertThat(unwrapped).isNotNull();
return unwrapped;
}
}

Loading…
Cancel
Save