Skip to content

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

@sbrannen

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.

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