You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A message like the following should appear in the log/exception messages:
Unable to convert value [60 seconds] to target type [Duration] due to: Unparseable date format (60 seconds). Should either be a ISO-8601 duration or a round number followed by the unit type
which is informative & points out the root cause.
Actual Behaviour
The following message/exception apears:
Error resolving property value [${health-check-cache-expiration}]. Property doesn't exist
The TimeConverterRegistrar rejects other malformed specifications, like 60us with an appropriate message, but completely misformatted values are silently ignored and misreported as missing. Other malformed inputs, like integers in i.e. micronaut.server.port report a conversion error / invalid property format.
I believe the reason is that when TimeConverterRegistrar rejects the text with the initial regexp check, it does not call context.reject() unlike the other validations.
TimeConverterRegistrar also accepts some malformed inputs without any errors:
Expected Behavior
A message like the following should appear in the log/exception messages:
which is informative & points out the root cause.
Actual Behaviour
The following message/exception apears:
The
TimeConverterRegistrar
rejects other malformed specifications, like60us
with an appropriate message, but completely misformatted values are silently ignored and misreported as missing. Other malformed inputs, like integers in i.e.micronaut.server.port
report a conversion error / invalid property format.I believe the reason is that when
TimeConverterRegistrar
rejects the text with the initial regexp check, it does not callcontext.reject()
unlike the other validations.TimeConverterRegistrar
also accepts some malformed inputs without any errors:Steps To Reproduce
(converting a service from a dropwizard-based implementation, so different conversion formats were used, and remained in the config)
Environment Information
Example Application
No response
Version
4.6.5
The text was updated successfully, but these errors were encountered: