Skip to content

8342934: TYPE_USE annotations printed with error causing "," in toString output#4243

Open
cushon wants to merge 1 commit intoopenjdk:pr/4242from
cushon:backport-JDK-8342934
Open

8342934: TYPE_USE annotations printed with error causing "," in toString output#4243
cushon wants to merge 1 commit intoopenjdk:pr/4242from
cushon:backport-JDK-8342934

Conversation

@cushon
Copy link
Contributor

@cushon cushon commented Jan 27, 2026

This backport of 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.@A @B String instead of java.lang.@A,@B String.


Progress

  • Change must not contain extraneous whitespace
  • JDK-8342934 needs maintainer approval
  • Commit message must refer to an issue

Integration blocker

 ⚠️ Dependency #4242 must be integrated first

Issue

  • JDK-8342934: TYPE_USE annotations printed with error causing "," in toString output (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/4243/head:pull/4243
$ git checkout pull/4243

Update a local copy of the PR:
$ git checkout pull/4243
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/4243/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4243

View PR using the GUI difftool:
$ git pr show -t 4243

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/4243.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 27, 2026

👋 Welcome back cushon! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jan 27, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport ff165f9f0cf519144d7361b766bcce53d04c518e 8342934: TYPE_USE annotations printed with error causing "," in toString output Jan 27, 2026
@openjdk
Copy link

openjdk bot commented Jan 27, 2026

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label Jan 27, 2026
@cushon cushon changed the base branch from master to pr/4242 January 27, 2026 10:41
@cushon cushon marked this pull request as ready for review January 27, 2026 10:42
@openjdk openjdk bot added clean Identical backport; no merge resolution required rfr Pull request is ready for review labels Jan 27, 2026
@mlbridge
Copy link

mlbridge bot commented Jan 27, 2026

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant