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

Vicente Romero vromero at openjdk.org
Sun Jan 29 04:27:02 UTC 2023


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

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

Commit messages:
 - 8293519: deprecation warnings should be emitted for uses of annotation methods inside other annotations

Changes: https://git.openjdk.org/jdk/pull/12280/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12280&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8293519
  Stats: 20 lines in 3 files changed: 20 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/12280.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12280/head:pull/12280

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


More information about the compiler-dev mailing list