JDK-8162817 : Annotation toString output not reusable for source input
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 5.0,6,7,8,9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-07-31
  • Updated: 2022-02-11
  • Resolved: 2016-08-03
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
9 b131Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8177370 :  
Description
As pointed out on core-libs-dev (http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-July/042637.html, http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-July/042645.html), the toString output for annotation objects cannot be directly reused as source input if the annotation values are any of:

Strings (no surrounding " characters)
Class values of array classes (uses JVM name)
Arrays (output uses brackets ("[]") rather than braces {"{}")

These shortcomings should be addressed.
Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/16a58e04ac2a User: lana Date: 2016-08-10 20:19:27 +0000
10-08-2016

URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/16a58e04ac2a User: darcy Date: 2016-08-03 15:14:06 +0000
03-08-2016

Review thread: http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-August/042696.html
01-08-2016