[jdk17u-dev] RFR: 8342934: TYPE_USE annotations printed with error causing "," in toString output [v2]

Liam Miller-Cushon cushon at openjdk.org
Fri Feb 20 12:32:53 UTC 2026


> This backport of [JDK-8342934](https://bugs.openjdk.org/browse/JDK-8342934) fixes a bug in `TypeMirror#toString` output when printing types with multiple type annotations.
> 
> `TypeMirror#toString` is specified to return a string that is "suitable for representing this type in source code". This fix causes types with multiple annotations to be printed with a space separated list of annotations, instead of using `,`, which would not be valid Java source. For example `java.lang. at A @B String` instead of `java.lang. at A, at B String`.

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 two additional commits since the last revision:

 - Merge branch 'JDK-8281238' into backport-JDK-8342934
 - Backport ff165f9f0cf519144d7361b766bcce53d04c518e

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

Changes:
  - all: https://git.openjdk.org/jdk17u-dev/pull/4243/files
  - new: https://git.openjdk.org/jdk17u-dev/pull/4243/files/50bfedbe..378913b6

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=4243&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=4243&range=00-01

  Stats: 17450 lines in 227 files changed: 6352 ins; 3235 del; 7863 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/4243.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/4243/head:pull/4243

PR: https://git.openjdk.org/jdk17u-dev/pull/4243


More information about the jdk-updates-dev mailing list