diff --git a/hippo4j-common/src/main/java/cn/hippo4j/common/toolkit/Singleton.java b/hippo4j-common/src/main/java/cn/hippo4j/common/toolkit/Singleton.java index 44a23934..4e5ef959 100644 --- a/hippo4j-common/src/main/java/cn/hippo4j/common/toolkit/Singleton.java +++ b/hippo4j-common/src/main/java/cn/hippo4j/common/toolkit/Singleton.java @@ -28,9 +28,9 @@ import java.util.function.Supplier; */ @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class Singleton { - + private static final ConcurrentHashMap SINGLE_OBJECT_POOL = new ConcurrentHashMap(); - + /** * Get a singleton object by key. * @@ -42,7 +42,7 @@ public final class Singleton { Object result = SINGLE_OBJECT_POOL.get(key); return result == null ? null : (T) result; } - + /** * Get a singleton object by key. * @@ -60,7 +60,7 @@ public final class Singleton { } return result != null ? (T) result : null; } - + /** * Object into container. * @@ -69,7 +69,7 @@ public final class Singleton { public static void put(Object value) { put(value.getClass().getName(), value); } - + /** * Object into container. *