RFR: 8361424: Eliminate Log methods mandatoryWarning() and mandatoryNote()

Archie Cobbs acobbs at openjdk.org
Thu Jul 17 18:36:52 UTC 2025


On Thu, 17 Jul 2025 18:24:42 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> The change looks great -- but I don't buy the changes in `AbstractLog` -- don't we need methods that take a varargs of flags (instead of just one) ? It's ok if we want to special case for the common case where there's just one, but restricting the API to only take one seems limiting (when in fact we already use multiple flags in compiler properties)

I agree with you in principle; the "only one flag" design choice was [already in place](https://github.com/openjdk/jdk/blob/347084bfbdbf048cd50c0e13e43ae53f6da77e6e/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractLog.java#L124), so this was just trying to stay consistent with the existing code.

Assuming you think this is an appropriate opportunity to correct that minor design deficiency, I can work on updating the patch accordingly.

Thanks for taking a look.

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

PR Comment: https://git.openjdk.org/jdk/pull/26138#issuecomment-3085047936


More information about the compiler-dev mailing list