RFR: JDK-8310861: Improve location reporting for javac serial lint warnings
Joe Darcy
darcy at openjdk.org
Mon Jun 26 01:01:39 UTC 2023
For a subset of the expanded serial lint warnings ([JDK-8202056](https://bugs.openjdk.org/browse/JDK-8202056), [JDK-8160675](https://bugs.openjdk.org/browse/JDK-8160675)), javac uses the location of the enclosing type rather than the method or field in question.
This PR addresses this by using the idiom of finding the method/field's tree within the type tree being checked.
All langtools regression tests pass when run locally; the intention is to backport this fix to JDK 21 as well.
-------------
Commit messages:
- JDK-8310861: Improve location reporting for javac serial lint warnings
Changes: https://git.openjdk.org/jdk/pull/14644/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14644&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8310861
Stats: 46 lines in 9 files changed: 21 ins; 0 del; 25 mod
Patch: https://git.openjdk.org/jdk/pull/14644.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14644/head:pull/14644
PR: https://git.openjdk.org/jdk/pull/14644
More information about the compiler-dev
mailing list