Skip to content

Commit 49c7546

Browse files
committed
Add nullability annotations to tests in module/spring-boot-jms
See gh-47263
1 parent c92617a commit 49c7546

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

module/spring-boot-jms/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ dependencies {
4848

4949
testRuntimeOnly("ch.qos.logback:logback-classic")
5050
}
51+
52+
tasks.named("compileTestJava") {
53+
options.nullability.checking = "tests"
54+
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ void unwrapWithoutJmsPoolOnClasspath() {
137137
}
138138

139139
private ConnectionFactory unwrap(ConnectionFactory connectionFactory) {
140-
return ConnectionFactoryUnwrapper.unwrap(connectionFactory);
140+
ConnectionFactory unwrapped = ConnectionFactoryUnwrapper.unwrap(connectionFactory);
141+
assertThat(unwrapped).isNotNull();
142+
return unwrapped;
141143
}
142144

143145
}

0 commit comments

Comments
 (0)