Merge pull request #491 from alexsomai/patch-1

Minor code changes
This commit is contained in:
Narendra Pathai 2016-08-29 00:00:44 +05:30 committed by GitHub
commit 6575b3ae99
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ public final class InitializingOnDemandHolderIdiom {
* Provides the lazy-loaded Singleton instance. * Provides the lazy-loaded Singleton instance.
*/ */
private static class HelperHolder { private static class HelperHolder {
public static final InitializingOnDemandHolderIdiom INSTANCE = private static final InitializingOnDemandHolderIdiom INSTANCE =
new InitializingOnDemandHolderIdiom(); new InitializingOnDemandHolderIdiom();
} }
} }

View File

@ -38,7 +38,7 @@ public final class ThreadSafeLazyLoadedIvoryTower {
/** /**
* The instance gets created only when it is called for first time. Lazy-loading * The instance gets created only when it is called for first time. Lazy-loading
*/ */
public static synchronized ThreadSafeLazyLoadedIvoryTower getInstance() { public static synchronized ThreadSafeLazyLoadedIvoryTower getInstance() {
if (instance == null) { if (instance == null) {
instance = new ThreadSafeLazyLoadedIvoryTower(); instance = new ThreadSafeLazyLoadedIvoryTower();