Description
With thanks to @danvega for bringing this to our attention, we made a mistake in #29010.
An annotation can be used on a record component if it targets one or more of FIELD
, METHOD
, PARAMETER
, and RECORD_COMPONENT
. The annotation is then propagated to the record component's field, accessor method, constructor parameter, or the record component itself based on these targets. @DefaultValue
already has a target of PARAMETER
so prior to the changes in #29010 it could be used on a record component and would then be propagated to the record's constructor. From there it would be found by configuration property binding and the annotation processor.
We can update the documentation and backport some tests in 2.5 as things already work there without any changes to main code.