RFR: 8231436: Fix the applicability of a no- at Target annotation type

Alex Buckley alex.buckley at oracle.com
Thu Feb 11 17:51:38 UTC 2021

On 2/9/2021 6:34 AM, Brian Goetz wrote:
> So I agree with Joe that:
>> I think it can be reasonable to interpret lack of @Target to mean 
>> "usable in any declaration context," but ill-advised to silently 
>> reinterpret absence of a @Target to indicate types and declarations. 
> and prefer that we leave the existing interpretation of "all declaration 
> contexts" for NTAs.

Thanks Brian. I will proceed with that policy by filing a new spec bug 
to overrule JDK-8231435.

A coarse DECLARATIONS target that explicitly indicates "all declaration 
contexts" (and that serves as a dual to the coarse TYPE_USE target) can 
be left for another day/thread/RFE.


More information about the compiler-dev mailing list