GitHub user peculater opened a pull request: https://github.com/apache/incubator-tamaya-extensions/pull/12
TAMAYA-358 Get CDI working with optional configvalues There are two use cases in here, both related to injected config values that are not required. First, the "required" parameter on the @Config annotation does not appear to have actually been referenced in the ConfigurationProducer. I used it to wrap the exception from the original ticket which allows the annotation to inject converter.convert(null) if it can. It won't ever be able to under full CDI as our producer is in ApplicationScope and nulls are only allowed in Dependent scope. I put in a comment about that, and I really want to improve our docs on this. Second, there was a bug in the type system that prevented Optional<T> from getting default values if they were set and necessary. The parameterizedtype was getting stripped, and the OptionalConverter couldn't figure out what to actually drop in there. I added a bunch of injection test cases and deleted some irrelevant imports too. You can merge this pull request into a Git repository by running: $ git pull https://github.com/peculater/incubator-tamaya-extensions TAMAYA-358-optional-injection Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-tamaya-extensions/pull/12.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #12 ---- commit 8ccc9331492e32718a88325568d894506bbbda76 Author: William Lieurance <william.lieurance@...> Date: 2018-11-13T07:50:38Z TAMAYA-358 Get CDI working with optional configvalues ---- ---