JDK-8246380 : Sealed classes: prohibit member classes of local/anonymous classes
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2020-06-02
  • Updated: 2020-11-11
  • Resolved: 2020-06-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 16
16Resolved
Related Reports
Relates :  
Relates :  
Description
Per this design discussion: 

https://mail.openjdk.java.net/pipermail/amber-spec-experts/2020-May/002161.html 

The consensus is that, at least until we revisit the topic, member classes of local/anonymous classes should not be allowed to use the 'sealed' modifier or to extend/implement a sealed class or interface. 

javac should be updated accordingly.
Comments
javac is already checking that constraint
03-06-2020