Doug Lea dl at
Sat Nov 28 11:37:29 UTC 2015

Does anyone know why the static singleton in java.lang.Runtime is
not declared as final?

   public class Runtime {
       private static Runtime currentRuntime = new Runtime();

I don't see a reason, so it seems likely that somehow no one
has noticed before that this should be final (for thread safety and
optimizability). But it would be nice if someone with access to
full JCK etc tests made sure that adding "final" didn't break


More information about the core-libs-dev mailing list