Make j.l.i.CallSite class sealed

Thiago Henrique Hupner thihup at gmail.com
Fri Oct 22 02:44:42 UTC 2021


Currently, the java.lang.invoke.CallSite has a package-private
constructor, and in its Javadoc it already mentions all the three
subclasses: ConstantCallSite, MutableCallSite and VolatileCallSite.

I guess that now that Java has support for sealed classes, the CallSite
could be a candidate for it too. So CallSite would be sealed and
the permitted subclasses would be non-sealed, to allow existing behavior.

https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/invoke/CallSite.html


More information about the core-libs-dev mailing list