Modify the string splicing method of getgroupedname()

This commit is contained in:
zzh 2019-11-06 10:15:38 +08:00
parent 1054a9916e
commit 7582de9910

View File

@ -24,7 +24,11 @@ import com.alibaba.nacos.api.common.Constants;
public class NamingUtils {
public static String getGroupedName(String serviceName, String groupName) {
return groupName + Constants.SERVICE_INFO_SPLITER + serviceName;
StringBuilder resultGroupedName = new StringBuilder()
.append(groupName)
.append(Constants.SERVICE_INFO_SPLITER)
.append(serviceName);
return resultGroupedName.toString().intern();
}
public static String getServiceName(String serviceNameWithGroup) {