diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/CatalogServiceV2Impl.java b/naming/src/main/java/com/alibaba/nacos/naming/core/CatalogServiceV2Impl.java index ab23f391b..242c27f17 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/CatalogServiceV2Impl.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/CatalogServiceV2Impl.java @@ -62,8 +62,7 @@ public class CatalogServiceV2Impl implements CatalogService { @Override public Object getServiceDetail(String namespaceId, String groupName, String serviceName) throws NacosException { - Service service = Service.newService(namespaceId, NamingUtils.getGroupName(serviceName), - NamingUtils.getServiceName(serviceName)); + Service service = Service.newService(namespaceId, groupName, serviceName); if (!ServiceManager.getInstance().containSingleton(service)) { throw new NacosException(NacosException.NOT_FOUND, String.format("service %s@@%s is not found!", groupName, serviceName)); @@ -73,8 +72,8 @@ public class CatalogServiceV2Impl implements CatalogService { ServiceMetadata detailedService = metadata.orElseGet(ServiceMetadata::new); ObjectNode serviceObject = JacksonUtils.createEmptyJsonNode(); - serviceObject.put("name", NamingUtils.getServiceName(serviceName)); - serviceObject.put("groupName", NamingUtils.getGroupName(serviceName)); + serviceObject.put("name", serviceName); + serviceObject.put("groupName", groupName); serviceObject.put("protectThreshold", detailedService.getProtectThreshold()); serviceObject.replace("selector", JacksonUtils.transferToJsonNode(detailedService.getSelector())); serviceObject.replace("metadata", JacksonUtils.transferToJsonNode(detailedService.getExtendData()));