mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-16 20:59:07 +00:00
Resolves checkstyle errors for api-gateway, lazy-loading, leader-election (#1066)
* Reduces checkstyle errors in lazy-loading * Reduces checkstyle errors in leader-election * Reduces checkstyle errors in api-gateway
This commit is contained in:
committed by
Ilkka Seppälä
parent
7f06f3b78c
commit
eae09fc07e
@@ -27,9 +27,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* Simple implementation of the lazy loading idiom. However, this is not thread safe.
|
||||
*
|
||||
*/
|
||||
public class HolderNaive {
|
||||
|
||||
@@ -38,14 +36,14 @@ public class HolderNaive {
|
||||
private Heavy heavy;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*/
|
||||
public HolderNaive() {
|
||||
LOGGER.info("HolderNaive created");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get heavy object
|
||||
* Get heavy object.
|
||||
*/
|
||||
public Heavy getHeavy() {
|
||||
if (heavy == null) {
|
||||
|
||||
Reference in New Issue
Block a user