From 5ac56885a1ca8e7210c05f542ec934f40d1fba09 Mon Sep 17 00:00:00 2001 From: MajorHe1 <53824889+MajorHe1@users.noreply.github.com> Date: Mon, 9 Jan 2023 13:55:31 +0800 Subject: [PATCH] [#ISSUE 9733] return origin key if value is null in StringPool.get() (#9798) --- core/src/main/java/com/alibaba/nacos/core/utils/StringPool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/alibaba/nacos/core/utils/StringPool.java b/core/src/main/java/com/alibaba/nacos/core/utils/StringPool.java index 4d111c36e..78f32c7f6 100644 --- a/core/src/main/java/com/alibaba/nacos/core/utils/StringPool.java +++ b/core/src/main/java/com/alibaba/nacos/core/utils/StringPool.java @@ -55,7 +55,7 @@ public class StringPool { value = GROUP_KEY_CACHE.get(key); } - return value; + return value == null ? key : value; } public static long size() {