Superclasses for inline classes

Dan Smith daniel.smith at oracle.com
Wed Feb 12 23:49:34 UTC 2020


> On Feb 12, 2020, at 11:41 AM, Remi Forax <forax at univ-mlv.fr> wrote:
> 
> a garbage class like java.util.Collections (with an 's' at the end) validate all the conditions but should not have an abstract constructor.

Why not? If identity classes can extend it, and it has no state/initialization, why not inline classes too?

(In reality, this particular class has chosen to actively prevent subclassing and instantiation by declaring a private constructor; it wouldn't qualify):

public class Collections {
    // Suppresses default constructor, ensuring non-instantiability.
    private Collections() {
    }



More information about the valhalla-spec-experts mailing list