JDK-8177370 : Release Note: Annotation toString output not reusable for source input
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2017-03-22
  • Updated: 2017-09-22
  • Resolved: 2017-03-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Description
The exact toString output of an annotation is deliberately not specified; from java.lang.annotation.Annotation.toString():
 
Returns a string representation of this annotation. The details of the representation are implementation-dependent [...]

Previously, the toString format of an annotation did not output certain information in a way that would be usable for a source code representation of an annotation, string values were not surrounded by double quote characters, array values were surrounded by brackets ("[]") rather than braces ("{}"), etc.

As a behavioral change, the annotation output has been updated to be faithful to a source code representation of the annotation.