File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
module/spring-boot-http-converter
src/test/java/org/springframework/boot/http/converter/autoconfigure Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -50,3 +50,7 @@ dependencies {
50
50
testRuntimeOnly(" org.springframework:spring-webflux" )
51
51
testRuntimeOnly(" tools.jackson.dataformat:jackson-dataformat-cbor" )
52
52
}
53
+
54
+ tasks. named(" compileTestJava" ) {
55
+ options. nullability. checking = " tests"
56
+ }
Original file line number Diff line number Diff line change 21
21
import java .util .List ;
22
22
import java .util .stream .Stream ;
23
23
24
+ import org .jspecify .annotations .Nullable ;
24
25
import org .junit .jupiter .api .Test ;
25
26
26
27
import org .springframework .http .converter .ByteArrayHttpMessageConverter ;
@@ -172,10 +173,12 @@ protected List<HttpMessageConverter<?>> postProcessPartConverters(
172
173
173
174
private List <HttpMessageConverter <?>> extractFormPartConverters (List <HttpMessageConverter <?>> converters ) {
174
175
AllEncompassingFormHttpMessageConverter formConverter = findFormConverter (converters );
176
+ assertThat (formConverter ).isNotNull ();
175
177
return formConverter .getPartConverters ();
176
178
}
177
179
178
- private AllEncompassingFormHttpMessageConverter findFormConverter (Collection <HttpMessageConverter <?>> converters ) {
180
+ private @ Nullable AllEncompassingFormHttpMessageConverter findFormConverter (
181
+ Collection <HttpMessageConverter <?>> converters ) {
179
182
for (HttpMessageConverter <?> converter : converters ) {
180
183
if (converter instanceof AllEncompassingFormHttpMessageConverter allEncompassingConverter ) {
181
184
return allEncompassingConverter ;
You can’t perform that action at this time.
0 commit comments