JDK-8236598 : make sure that the compiler issues an error for any modifier applied to record components
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-12-31
  • Updated: 2020-03-12
  • Resolved: 2020-03-12
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 15
15Fixed
Related Reports
Relates :  
Description
javac has tests to check that some modifiers are not allowed in record components, the test should be complete
Comments
fixed in the records-2 branch in amber repo
12-03-2020

fixed in records-2 repo in amber
09-03-2020

I'm inclined to keep the compiler behavior here, and outlaw it in the spec, since the only sensible modifier is `final` and it's redundant. We can always allow modifiers later.
02-01-2020