提交 600553ec 编写于 作者: I Ilkka Seppälä 提交者: GitHub

Merge pull request #583 from shaiktaj/patch-1

Updated ThreadSafeLazyLoadedivoryTower
......@@ -33,7 +33,12 @@ public final class ThreadSafeLazyLoadedIvoryTower {
private static ThreadSafeLazyLoadedIvoryTower instance;
private ThreadSafeLazyLoadedIvoryTower() {}
private ThreadSafeLazyLoadedIvoryTower() {
// to prevent instantiating by Reflection call
if (instance != null) {
throw new IllegalStateException("Already initialized.");
}
}
/**
* The instance gets created only when it is called for first time. Lazy-loading
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册