Summary
Add sealed to the class signature of java.io.Console class declaration
Problem
With the change to JDK-8295803, java.io.Console class removed final classifier, thus it is possible to have an arbitrary subclass in the java.io package. Limiting this to known internal implementations improves platform integrity.
Specification
Change the declaration of java.io.Console class from
public class Console implements Flushable
to
public sealed class Console implements Flushable permits ClassA, ClassB, ...
ClassA, ClassB, ...: package private classes in java.io. Names to be defined
- csr of
-
JDK-8298416 Console should be declared `sealed`
-
- Resolved
-