PathEditor should interpret empty string as relative empty path #25029
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
Version information
Spring-boot version: 2.2.6.RELEASE
Issue reproduction and actual result
I have some simple constructor-bound
ConfigurationProperties
:This test, in which I try to bind an empty string, fails:
Additional observations
When I add a
@DefaultValue
to the constructor property:The same test fails with an exception. The exception is the same as in spring-projects/spring-boot#21264, but it means that binding to the default value is attempted.
Note that the same issue occurs not only with constructor-bound properties, but java bean binding as well.
Expected result
An empty string can be bound to a property of
java.nio.file.Path
type resulting in a relative empty path (equal to the result ofPaths.get("")
).The text was updated successfully, but these errors were encountered: