Files
spring-boot/spring-boot-project
Andy Wilkinson 69de06ac2d Remove origin support for empty YAML maps
Adding origin support caused an unexpected and unwanted change
in behavior where configuration property binding would fail. The
failure would occur because there was no way to convert from the
entry in the environment that represents the empty map to the
target type.

The commit changes the YAML loader to drop empty maps,
effectively reverting the map portion of
3bcbb0e594 and gh-21704. This aligns
the behavior with the decision we made in gh-19095.

Origin support for an empty list has been retained as it does not
have a negative effect on configuration property binding. Prior to
these changes, an empty YAML list was mapped to an origin tracked
value that contains an empty list. Fully reverting
3bcbb0e594 would have resulted in an
empty YAML list being mapped to an empty string. To avoid adding a
collection type to the environment, we now map an empty YAML list
to an origin tracked value that contains an empty string.

Closes gh-35403
2024-09-10 10:09:51 +01:00
..
2024-09-03 12:10:04 -07:00
2024-09-09 13:53:14 +01:00