For the first time in a LTS version of Java (Java 17) we have the sealed keyword that, in a nutshell, give us the possibility to restrict the hierarchy:
public abstract sealed class Person
permits Employee, Manager {
//...
}
If I want to create a new subclass that extend the Person base class, I have to modify the base class too. Is it this against the open close principle?