JDK-8234908 : consider if the MANDATED flag should be applied to record members added by the compiler
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2019-11-27
  • Updated: 2022-06-08
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.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
Background: A mail to compiler-dev (https://mail.openjdk.java.net/pipermail/compiler-dev/2022-May/019783.html) noted that "it also seems like the parameters of a compact constructor for records are never marked as mandated, even when compiling with the -parameters flag (but the MethodParameters attribute is always written or record constructors)."

the MANDATED flag has been used so far for parameters added by the compiler. Now the compiler is adding more members that are not parameters only, like accessors and constructors in records. We should consider if the flag should be applied to those too. This flag would only be visible by source reflection