-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@ConfigProperty with defaultValue="" are not working on master #5947
Comments
Also relevant: eclipse/microprofile-config#475 Arguably, we should disallow |
On this project, the test passes on The bug is narrowed down to only |
This was discussed in chat. In conclusion, having a default value of Empty values (as discussed in eclipse/microprofile-config#446) are used when a value is missing. So in order to represent a value that can be emptiable, be it a Because we haven't quite hammered out the spec inconsistencies in our implementation, injected values can sometimes result in So in summary: If a property can be empty, make it The action items would be:
|
as discussed in the chat, there is a bug with |
@ia3andy can you clarify the bug of the last comment? If you we get back to it in a week, we will have forgotten what it is about. |
@gsmet here is a better description of what I meant: An exception is thrown when using this without providing @ConfigProperty(name = "my-prop")
Optional<String> myProp It should not fail and instead give a Note: @ConfigProperty(name = "my-prop", defaultValue="")
Optional<String> myProp |
This is fixed in upstream with smallrye/smallrye-config#209. |
It looks like this is fixed with the Smallrye Config update. Reopen if the problem persists |
Describe the bug
When using
@ConfigProperty
with adefaultValue=""
, it is never set with the defaultValue.Expected behavior
"" should be used when no configuration is set
Actual behavior
the attribute is null
To Reproduce
Environment (please complete the following information):
WE SHOULD HAVE SOME TEST FOR IT BEFORE THE NEXT RELEASE
The text was updated successfully, but these errors were encountered: