Fixing NPE in AbstractNamedValueMethodArgumentResolver
See gh-23882
This commit is contained in:
committed by
Rossen Stoyanchev
parent
fd9678833f
commit
64f2beb9bf
@@ -145,6 +145,14 @@ public class HeaderMethodArgumentResolverTests {
|
||||
assertThat(result).isEqualTo(Optional.of("bar"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resolveOptionalHeaderWithValueFromNullConversionServiceInput() throws Exception {
|
||||
GenericApplicationContext context = new GenericApplicationContext();
|
||||
context.refresh();
|
||||
resolver = new HeaderMethodArgumentResolver(null, context.getBeanFactory());
|
||||
resolveOptionalHeaderWithValue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resolveOptionalHeaderAsEmpty() throws Exception {
|
||||
Message<String> message = MessageBuilder.withPayload("foo").build();
|
||||
|
||||
Reference in New Issue
Block a user