RFR: 8355065: ConcurrentModificationException in RichDiagnosticFormatter [v4]
Liam Miller-Cushon
cushon at openjdk.org
Mon Apr 28 22:45:06 UTC 2025
> Hi, please consider this fix for [JDK-8355065](https://bugs.openjdk.org/browse/JDK-8355065). RichDiagnosticFormatter is comparing type variables by their `toString` representation, and in this example the comparison fails due to type annotations. Replacing a call to `stripMetadataIfNeeded` with `stripMetadata` allows the comparison to succeed, and is consistent with the approach used in other parts of RichDiagnosticFormatter (e.g. for [the fix for JDK-8144580](https://github.com/openjdk/jdk/commit/570883e4dc5f769e17b3fcd8f2bbeb369dfe3a5d)).
Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
- Merge remote-tracking branch 'origin/master' into JDK-8355065
- EnumMap
- Detect recursion in RichDiagnosticFormatter#format
The class is not designed to be re-entered, and will produce incorrect
results if that happens.
- 8355065: ConcurrentModificationException in RichDiagnosticFormatter
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/24769/files
- new: https://git.openjdk.org/jdk/pull/24769/files/da1c2f50..3d182600
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=24769&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=24769&range=02-03
Stats: 42245 lines in 1206 files changed: 31632 ins; 6902 del; 3711 mod
Patch: https://git.openjdk.org/jdk/pull/24769.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24769/head:pull/24769
PR: https://git.openjdk.org/jdk/pull/24769
More information about the compiler-dev
mailing list