RFR: 8293519: deprecation warnings should be emitted for uses of annotation methods inside other annotations

Jan Lahoda jlahoda at openjdk.org
Tue Jan 31 12:00:02 UTC 2023


On Sun, 29 Jan 2023 04:19:49 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> Javac is forgetting to double check if the left hand side in an annotation name-value pair is a deprecated method, basically in this case:
> 
> @interface Anno {
>     @Deprecated
>     boolean b() default false;
> }
> 
> @Anno(b = true) // a warning should be issued here
> class Foo {}
> 
> this PR is fixing this oversight,
> 
> TIA

Seems sensible. Do we need a CSR for this?

-------------

Marked as reviewed by jlahoda (Reviewer).

PR: https://git.openjdk.org/jdk/pull/12280


More information about the compiler-dev mailing list