Empty string check after conversion in AbstractNamedValueArgumentResolver

Closes gh-33794
This commit is contained in:
rstoyanchev
2024-11-06 14:10:45 +00:00
parent 59ec871e76
commit d4719493bd
2 changed files with 12 additions and 1 deletions

View File

@@ -74,6 +74,12 @@ class NamedValueArgumentResolverTests {
assertTestValue("value", "2022-09-16");
}
@Test // gh-33794
void dateNullValue() {
this.service.executeDate(null);
assertTestValue("value");
}
@Test
void objectTestValue() {
this.service.execute(Boolean.TRUE);
@@ -182,7 +188,7 @@ class NamedValueArgumentResolverTests {
void executeString(@TestValue String value);
@GetExchange
void executeDate(@TestValue @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate value);
void executeDate(@Nullable @TestValue(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate value);
@GetExchange
void execute(@TestValue Object value);