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 default name #233
Comments
@struberg @OndrejM @johnament should this be fix this in MP Config 1.1? |
I'll vote yes, though. |
This would be a breaking change, although this is how I wanted it initially. And to be honest, I was really confused why our Payara impl decapitalizes the class name until I found out that this is specified by the spec. I'm in favor of this fix, although we may also preserve the current behavior as deprecated and the new behavior taking precedence if both keys are found. In other words, if a Capitalized config key is found, it will be used, and if not, decapitalized key will be searched for and used if found. The new behavior should be stressed while the old behavior still supported and mentioned somewhere in the spec (e.g. as a compatibility or deprecation note). |
+1 on Ondrej! |
Since there was no TCK test for this previously, I'm OK if we change the behavior in the release. GConfig actually didn't support it at all. |
BTW, if you want this for MP Config 1.1, it has to have a pull request submitted today. If it doesn't make this release, we'll need to keep both behaviors around for following releases. |
ok. can we agree on which one to go for? I will submit a PR once a decision is made.
|
2 or 2.toLowerCase() |
Thanks @smillidge ! I'll provide a PR with 2. |
Signed-off-by: Emily Jiang <emijiang6@googlemail.com>
I'm in favor of 2 for the sake of simplicity. I agree that there's not much risk in introducing this breaking change in such a short time, provided that it's properly announced (e.g. in release notes). |
Signed-off-by: Emily Jiang <emijiang6@googlemail.com>
* #233 configProperty default name Signed-off-by: Emily Jiang <emijiang6@googlemail.com> * emily_config1.1 Signed-off-by: Emily Jiang <emijiang6@googlemail.com> * Revert "#233 configProperty default name" This reverts commit 7830f57. * Revert "emily_config1.1" This reverts commit 6caf28b. * Revert "Revert "#233 configProperty default name"" This reverts commit 5139429. * Revert "#233 configProperty default name" This reverts commit 7830f57. * #233 configProperty default name Signed-off-by: Emily Jiang <emijiang6@googlemail.com>
Signed-off-by: John D. Ament <john.d.ament@gmail.com>
Signed-off-by: John D. Ament <john.d.ament@gmail.com>
Signed-off-by: John D. Ament <john.d.ament@gmail.com>
…derived name from a class eclipse/microprofile-config#233 Signed-off-by: Scott Stark <starksm64@gmail.com>
…default derived name from a class eclipse/microprofile-config#233 Signed-off-by: Scott Stark <starksm64@gmail.com>
In ConfigProperty.java, the javadoc says
{@code class_name} is the fully qualified name of the class being injected to with the first letter decaptialised.
Originally, I proposed to be {@code class_name} is the simple name of the class being injected to with the first letter decaptialised.
The decaptialised bit does make sense.
Later on, Mark changed it to be fully qualified classname. I missed the commit. The decaptialised bit looks very odd. e.g
com.acme.myBean.myProperty
as com.acme.Mybean.myProperty is much better read.
Can we remove the decaptialisation bit? I know this is behaviour change. Considering the light usage, it should be minimal. Thoughts?
The text was updated successfully, but these errors were encountered: