RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v6]

Archie Cobbs acobbs at openjdk.org
Fri May 9 21:09:53 UTC 2025


On Fri, 9 May 2025 20:25:40 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> I was working on something in this line too, just pushed the patch

Looks reasonable, a couple of comments...

Can't `LintCategory.alias` be `final`? If so I think this obviates the patch to `DetectMutableStaticFields.java`.

This is not a general solution to aliasing of lint categories. For example, if someone were to add an alias `filenames` for `path`, then [this code](https://github.com/openjdk/jdk/blob/68a118509a562334eb8c099129d79520041b10cf/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java#L506-L507) and a few other examples like it would break.

Do we care about that? If so then we might want to implement a proper fix for lint aliases as a separate pre-requisite to this issue.

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

PR Comment: https://git.openjdk.org/jdk/pull/24746#issuecomment-2867878715


More information about the compiler-dev mailing list