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
Sometimes a property needs to have a value that is returned if no configuration source has explicitly defined what the value of the property should be. This is commonly referred to as a "default value".
As a:
Application user/user of the configuration itself
API user (application developer)
SPI user (container or runtime developer)
Specification implementer
...I need to be able to:
Be able to specify the default value for a configuration property relating to my application which is used in any API usage context (i.e. not just in CDI).
Receive the default value for a configuration property when no configuration source specifies a value for the property and when no configuration source explicitly clears the property.
...which enables me to:
Have a similar experience between CDI and the programmatic API; have a consistent result even if I switch between APIs.
@dmlloyd I think this issue is related to #559. However your comment suggests you think MP Config should not provide a way to programmatically set the default value. I am a bit confused.
In order to have a single, consistent view of default values, all default values should be established once (ideally when the configuration is being built). This can be done programmatically, or via the CDI mechanism, or by a mixture of both: the important thing is that the default value for a given property can only be defined one time.
The comment on #559 talks about adding a method to the accessor which allows a default value to be given at resolution time, which completely undermines the principle of having fixed default values.
Description
Sometimes a property needs to have a value that is returned if no configuration source has explicitly defined what the value of the property should be. This is commonly referred to as a "default value".
As a:
...I need to be able to:
...which enables me to:
Have a similar experience between CDI and the programmatic API; have a consistent result even if I switch between APIs.
Related to #475.
The text was updated successfully, but these errors were encountered: