3 ms·
Lazy-j: Simple lazy initialization library for Java
- karmakaze 9y agoThe 'holder pattern' lazy initialization is more compact although it depends on understanding the JLS/JVM why it works. https://en.wikipedia.org/wiki/Initialization-on-demand_holder_idiom https://en.wikipedia.org/wiki/Initialization-on-demand_holde...
- whoisthemachine 9y agoYes I'm aware of it - but I do not prefer the method for the reason you mention.