RFR: 8361424: Eliminate Log methods mandatoryWarning() and mandatoryNote()
Archie Cobbs
acobbs at openjdk.org
Thu Jul 17 17:08:01 UTC 2025
The fix for [JDK-8359493](https://bugs.openjdk.org/browse/JDK-8359493) added the ability to associate `DiagnosticFlag`'s to specific warnings at the point of definition in `compiler.properties`. In cases where the flag is an inherent property of the warning itself, `compiler.properties` is a more appropriate place to declare it, instead of having to add it at all the points in the codebase where that particular warning is used.
In particular, the Log API methods `mandatoryWarning()` and `mandatoryNote()` can be removed, as they serve only to add the `MANDATORY` flag to warnings and notes for which "mandatoryness" is inherent. Doing so should help decomplexify the code a bit.
-------------
Commit messages:
- Merge branch 'master' into JDK-8361424
- Eliminate Log.mandatoryNote() and add MANDATORY flags to compiler.properties.
- Eliminate Log.mandatoryWarning() and add MANDATORY flags to compiler.properties.
- Remove Log::strictWarning
- Merge with latest compiler changes
- Initial push
Changes: https://git.openjdk.org/jdk/pull/26138/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26138&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8361424
Stats: 103 lines in 9 files changed: 8 ins; 48 del; 47 mod
Patch: https://git.openjdk.org/jdk/pull/26138.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26138/head:pull/26138
PR: https://git.openjdk.org/jdk/pull/26138
More information about the compiler-dev
mailing list