RFR: 8359596: Behavior change when both -Xlint:options and -Xlint:-options flags are given [v3]
Jan Lahoda
jlahoda at openjdk.org
Mon Jul 7 16:07:53 UTC 2025
On Tue, 24 Jun 2025 13:40:15 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
>> My minor contribution to #24746 (which fixed [JDK-8354556](https://bugs.openjdk.org/browse/JDK-8354556)) accidentally introduced a change in the compiler's behavior when given conflicting lint flags like `-Xlint:options -Xlint:-options`. This PR restores the original behavior.
>>
>> Although this might be considered a weird corner case, many build systems add flags in multiple stages and this can easily result in both flags being added, and so the behavior in this scenario needs to stay consistent.
>>
>> Basically the code was trying to be too clever; when the original logic is restored, the code gets simpler.
>
> Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
>
> Cleanups per review comments.
FWIW, I am sorry, I missed the backport went to JDK 25u - that would not be part of JDK 25 GA. I've opened:
https://github.com/openjdk/jdk/pull/26163
which should go into the `jdk25` branch, and should eventually end up in JDK 25 GA, AFAIK. Sorry for missing this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25840#issuecomment-3045738318
More information about the compiler-dev
mailing list