Skip to content

Commit 6575b3a

Browse files
authored
Merge pull request iluwatar#491 from alexsomai/patch-1
Minor code changes
2 parents eb75773 + 095adda commit 6575b3a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

singleton/src/main/java/com/iluwatar/singleton/InitializingOnDemandHolderIdiom.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static InitializingOnDemandHolderIdiom getInstance() {
5353
* Provides the lazy-loaded Singleton instance.
5454
*/
5555
private static class HelperHolder {
56-
public static final InitializingOnDemandHolderIdiom INSTANCE =
56+
private static final InitializingOnDemandHolderIdiom INSTANCE =
5757
new InitializingOnDemandHolderIdiom();
5858
}
5959
}

singleton/src/main/java/com/iluwatar/singleton/ThreadSafeLazyLoadedIvoryTower.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private ThreadSafeLazyLoadedIvoryTower() {}
3838
/**
3939
* The instance gets created only when it is called for first time. Lazy-loading
4040
*/
41-
public static synchronized ThreadSafeLazyLoadedIvoryTower getInstance() {
41+
public static synchronized ThreadSafeLazyLoadedIvoryTower getInstance() {
4242

4343
if (instance == null) {
4444
instance = new ThreadSafeLazyLoadedIvoryTower();

0 commit comments

Comments
 (0)