Double-Checked Locking is widely cited and used as an efficient method for implementing lazy initialization in a multithreaded environment.
Unfortunately, it will not work reliably in a platform independent way when implemented in Java, without additional synchronization.
https://github.com/facebook/stetho/blob/5cc93ec78908cdded19c5352a90635a33cf2fa7f/stetho/src/main/java/com/facebook/stetho/inspector/helper/IntegerFormatter.java#L19-L21
Double-Checked Locking is widely cited and used as an efficient method for implementing lazy initialization in a multithreaded environment. Unfortunately, it will not work reliably in a platform independent way when implemented in Java, without additional synchronization.