diff --git a/singleton/src/main/java/com/iluwatar/singleton/ThreadSafeLazyLoadedIvoryTower.java b/singleton/src/main/java/com/iluwatar/singleton/ThreadSafeLazyLoadedIvoryTower.java index 58d6e53b972..fcafba3611c 100644 --- a/singleton/src/main/java/com/iluwatar/singleton/ThreadSafeLazyLoadedIvoryTower.java +++ b/singleton/src/main/java/com/iluwatar/singleton/ThreadSafeLazyLoadedIvoryTower.java @@ -44,13 +44,9 @@ private ThreadSafeLazyLoadedIvoryTower() { * The instance doesn't get created until the method is called for the first time. */ public static synchronized ThreadSafeLazyLoadedIvoryTower getInstance() { - if (instance == null) { - synchronized (ThreadSafeLazyLoadedIvoryTower.class) { - if (instance == null) { + if (instance == null) { instance = new ThreadSafeLazyLoadedIvoryTower(); - } } - } return instance; } }