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
When applying @configuration(prefix = "foo") on an interface, we would expect that any @PropertyNames specified in the interface would automatically look for foo.[names], but this does not apply when there are parameters specified, instead using the PropertyName directly.
foo.bar: "GOOD"
foo.baz: "ALSO GOOD"
bar: "ALSO BAD"
Expected
getFooBar() --> GOOD
getFoo("bar") --> GOOD
getFoo("baz") --> ALSO GOOD
Actual
getFooBar() --> GOOD
getFoo("bar") --> ALSO BAD
getFoo("baz") --> BAD // From the default value
Issue is in ConfigProxyFactory.createParameterizedProperty.
Changing this to only the correct behavior would be breaking for many clients, we will include backward compatibility for cases in which clients specify the prefix (e.g. in the above example, a name = "foo.${0}" would also produce the same result).
This would however still be breaking for clients that specified a prefix at the top level config, and then ignored it in the body.
The text was updated successfully, but these errors were encountered:
When applying @configuration(prefix = "foo") on an interface, we would expect that any @PropertyNames specified in the interface would automatically look for foo.[names], but this does not apply when there are parameters specified, instead using the PropertyName directly.
Example
Given config
Expected
Actual
Issue is in ConfigProxyFactory.createParameterizedProperty.
Changing this to only the correct behavior would be breaking for many clients, we will include backward compatibility for cases in which clients specify the prefix (e.g. in the above example, a name = "foo.${0}" would also produce the same result).
This would however still be breaking for clients that specified a prefix at the top level config, and then ignored it in the body.
The text was updated successfully, but these errors were encountered: