JDK-8282572 : EnumSet should be a sealed class
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-03-02
  • Updated: 2022-03-19
  • Resolved: 2022-03-14
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 19
19 b14Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
EnumSet is a public class but it has only package-private constructors, and the only intended subclasses are RegularEnumSet and JumboEnumSet. EnumSet should be turned into a sealed class that permits only those subclasses.
Comments
Changeset: 3cf83a67 Author: Jaikiran Pai <jpai@openjdk.org> Date: 2022-03-14 03:17:57 +0000 URL: https://git.openjdk.java.net/jdk/commit/3cf83a671eaedd78d87197dffa76dcc3fededb78
14-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7741 Date: 2022-03-08 10:50:35 +0000
08-03-2022