shortcuts don’t

Forcefully moving to a new computer sometimes leads to windy ways of encountering things you once wrote. Thoughts flash through the mind. Is it possible to instantiate a singleton at class loading time? Is class loading thread safe? Could it be as easy as instantiating the singleton object in a static block just like… 

No. I’m possibly not the first one coming up with that shortcut. And class loading happens to be thread safe. That’s good. But a loaded class is identified by its fully qualified name in combination with the identification of the class loader that loads the class. That makes it possible – feasible even – that a class is loaded by more than a single class loader and consequently a static block in the class file is executed more than once.

See? There are no shortcuts. Just do it the ‘proper way’.