mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 16:59:32 +00:00
* #2449 bump maven-checkstyle-plugin from 3.1.0 to 3.2.0 + resolve checkstyle issues * remove FileSelectorJFrame.java to resolve checkstyle issue * remove FileSelectorJFrame.java to resolve checkstyle issue * remove FileSelectorJFrame.java to resolve checkstyle issue * add refactored file with correct filename to resolve checkstyle issue * add the test data * change filenames from JFrame to Jframe for checkstyle * fix code smell from sonar report * add new testcases to improve the test coverage * remove code smell
This commit is contained in:
@@ -27,6 +27,13 @@ package com.iluwatar.registry;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* In Registry pattern, objects of a single class are stored and provide a global point of access to them.
|
||||
* Note that there is no restriction on the number of objects.
|
||||
*
|
||||
* <p> The given example {@link CustomerRegistry} represents the registry used to store and
|
||||
* access {@link Customer} objects. </p>
|
||||
*/
|
||||
public class App {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
*/
|
||||
package com.iluwatar.registry;
|
||||
|
||||
/**
|
||||
* Customer entity used in registry pattern example.
|
||||
*/
|
||||
public class Customer {
|
||||
|
||||
private final String id;
|
||||
|
||||
@@ -27,6 +27,9 @@ package com.iluwatar.registry;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* CustomerRegistry class used to store/access {@link Customer} objects.
|
||||
*/
|
||||
public final class CustomerRegistry {
|
||||
|
||||
private static final CustomerRegistry instance = new CustomerRegistry();
|
||||
|
||||
Reference in New Issue
Block a user