Skip to content

Commit 33a3d6f

Browse files
authored
Merge pull request iluwatar#702 from zafarella/patch-4
Add thread safety comment on enum based singleton
2 parents 8960ef6 + dddfb52 commit 33a3d6f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
/**
2626
* Enum based singleton implementation. Effective Java 2nd Edition (Joshua Bloch) p. 18
27+
*
28+
* This implementation is thread safe, however adding any other method and its thread safety
29+
* is developers responsibility.
2730
*/
2831
public enum EnumIvoryTower {
2932

0 commit comments

Comments
 (0)