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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy