config icon indicating copy to clipboard operation
config copied to clipboard

hasPathOrNull("") yields an error message that does not correspond to the problem

Open ljnelson opened this issue 3 years ago • 0 comments

While accidentally doing horrible things with hasPathOrNull(String), I managed to pass an empty string. The error message said, in part:

com.typesafe.config.ConfigException$BadPath: path parameter: Invalid path '': path has a leading, trailing, or two adjacent period '.' (use quoted "" empty string if you want an empty element)

I assume that indeed an empty string should be a problem (though it could be used to return the thing itself), but this error message momentarily confused me.

ljnelson avatar Apr 08 '22 21:04 ljnelson