JDK-8253494 : new restrictions on annotations of record components
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Priority: P3
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2020-09-22
  • Updated: 2020-11-09
  • Resolved: 2020-10-19
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 16
16Resolved
Related Reports
CSR :  
Description
@Target(ElementType.PARAMETER)
@interface DevAnnotation{ String value(); }  record 

R(@DevAnnotation(���devA���) String s) {     // Error!
      R(@DevAnnotation(���devB���) String s) {
          // Explicitly declared canonical constructor
          ...
      }
  }

or 

R(@DevAnnotation(���devA���) String s) {     // Error!
      R(String s) {
          // Explicitly declared canonical constructor
          ...
      }
  }

this one should be erroneous too:
R(@DevAnnotation(���devA���) String s) { // Error!
      R(@DevAnnotation(���devA���) String s) {
          // Explicitly declared canonical constructor
          ...
      }
  }
Comments
we think that the current state of the art if the right approach, we don't see this as an issue
19-10-2020