RFR: 8356441: IllegalStateException in RichDiagnosticFormatter after JDK-8355065

Liam Miller-Cushon cushon at openjdk.org
Wed May 7 22:04:53 UTC 2025


[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.

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

Commit messages:
 - Imports
 - 8356441: IllegalStateException in RichDiagnosticFormatter after JDK-8355065

Changes: https://git.openjdk.org/jdk/pull/25105/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25105&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8356441
  Stats: 157 lines in 2 files changed: 137 ins; 13 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/25105.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25105/head:pull/25105

PR: https://git.openjdk.org/jdk/pull/25105


More information about the compiler-dev mailing list