mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 12:59:00 +00:00
#502 Replaced usages of System.out with logger.
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
*/
|
||||
package com.iluwatar.lazy.loading;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* Same as HolderNaive but with added synchronization. This implementation is thread safe, but each
|
||||
@@ -30,13 +33,15 @@ package com.iluwatar.lazy.loading;
|
||||
*/
|
||||
public class HolderThreadSafe {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(HolderThreadSafe.class);
|
||||
|
||||
private Heavy heavy;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public HolderThreadSafe() {
|
||||
System.out.println("HolderThreadSafe created");
|
||||
LOGGER.info("HolderThreadSafe created");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user