Hi folks,
Sorry if this has been covered before - I'm still getting up to speed a bit.
I have some Quarkus code with properties like this:
@ConfigProperty(name = "rbac.retry.back-off.initial-value", defaultValue = "0.1S")
Duration initialBackOff;
The annotation here is org.eclipse.microprofile.config.inject.ConfigProperty and given there is a default value, means that the field is guaranteed to be non-null.
Would it be possible to extend the checkers (I'm using NullAway) to account for this case and automatically detect that a CDI field with default values is
@NonNull? What would be involved in this?
Thanks,
Ben
-- Ben Evans (He/Him)
Senior Principal Software Engineer & Java Champion, Red Hat Runtimes