Skip to content

Further align synthesized annotation toString() with modern JDKs #36417

Closed

Description

@sbrannen

While working on #35938, I noticed that the toString() implementation for annotations on modern JDKs no longer includes value= for an annotation with a single value attribute.

I then noticed that the toString() implementation on modern JDKs also differs in the following ways.

  • d is no longer appended to double values (since it's superfluous).
  • There is no longer a space after a (byte) cast.
  • Hexidecimal values in bytes are formatted using lowercase instead of uppercase.

Since these changes are simple to make in our toString() implementation for synthesized annotations, we should update SynthesizedMergedAnnotationInvocationHandler accordingly.

Activity

  1. added this to the 7.0.6 milestone on Mar 4, 2026
  2. self-assigned this
    on Mar 4, 2026
  3. added
    in: coreIssues in core modules (aop, beans, core, context, expression)
    on Mar 4, 2026
  4. added a commit that references this issue on Mar 4, 2026
    22301fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions