RFR: 8356441: IllegalStateException in RichDiagnosticFormatter after JDK-8355065
Chen Liang
liach at openjdk.org
Thu May 8 16:06:00 UTC 2025
On Wed, 7 May 2025 19:25:03 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
> [JDK-8355065](https://bugs.openjdk.org/browse/JDK-8355065) fixed an issue where if RichDiagnosticFormatter was used recursively, it would overwrite instance state. That fix added guards to prevent the logic from being used recursively. As reported in [JDK-8356441](https://bugs.openjdk.org/browse/JDK-8356441) there are other situations where RichDiagnosticFormatter is used recursively. This fixes updates it to support being used recursively, by saving and restoring instance state on recursive calls.
test/langtools/tools/javac/annotations/typeAnnotations/RichFormatterWithTypeAnnotationsReentrantTest.java line 126:
> 124: "^",
> 125: "1 error",
> 126: "1 warning");
These messages are locale specific. I don't know if we can detect the keys for these messages instead.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25105#discussion_r2080022589
More information about the compiler-dev
mailing list