From 9bcb901174598c049f9ec20213a964695611ac1e Mon Sep 17 00:00:00 2001 From: Wu Zhiguo Date: Sat, 3 Apr 2021 12:57:57 +0800 Subject: [PATCH] Fix some typo (#5260) * fix some typo * rollback some comment format --- .../alibaba/nacos/api/common/Constants.java | 2 +- .../naming/pojo/healthcheck/impl/Http.java | 2 +- .../client/config/impl/ClientWorker.java | 6 ++-- .../nacos/client/naming/utils/Chooser.java | 4 +-- .../nacos/cmdb/service/CmdbReader.java | 2 +- .../nacos/common/utils/CollectionUtils.java | 4 +-- .../aspect/CapacityManagementAspect.java | 28 +++++++++---------- .../server/controller/CapacityController.java | 2 +- .../server/controller/ConfigController.java | 10 +++---- .../server/controller/ConfigServletInner.java | 9 +++--- .../config/server/model/ConfigInfoBase.java | 2 +- .../config/server/model/ConfigInfoBaseEx.java | 2 +- .../server/service/ClientTrackService.java | 20 ++++++------- .../server/service/ConfigCacheService.java | 4 +-- .../server/service/ConfigSubService.java | 19 ++++++------- .../naming/controllers/ApiController.java | 2 +- .../naming/controllers/CatalogController.java | 2 +- .../nacos/naming/misc/UtilsAndCommons.java | 2 +- .../nacos/naming/push/PushService.java | 2 +- .../nacos/test/config/ConfigAPI_CITCase.java | 6 ++-- 20 files changed, 64 insertions(+), 66 deletions(-) diff --git a/api/src/main/java/com/alibaba/nacos/api/common/Constants.java b/api/src/main/java/com/alibaba/nacos/api/common/Constants.java index 9d1d1de0e..fedcf759d 100644 --- a/api/src/main/java/com/alibaba/nacos/api/common/Constants.java +++ b/api/src/main/java/com/alibaba/nacos/api/common/Constants.java @@ -158,7 +158,7 @@ public class Constants { public static final int NAMING_INSTANCE_ID_SEG_COUNT = 4; - public static final String NAMING_HTTP_HEADER_SPILIER = "\\|"; + public static final String NAMING_HTTP_HEADER_SPLITTER = "\\|"; public static final String DEFAULT_CLUSTER_NAME = "DEFAULT"; diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/Http.java b/api/src/main/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/Http.java index 8db6cc2f1..5a313ae84 100644 --- a/api/src/main/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/Http.java +++ b/api/src/main/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/Http.java @@ -75,7 +75,7 @@ public class Http extends AbstractHealthChecker { return Collections.emptyMap(); } final Map headerMap = new HashMap(16); - for (final String s : headers.split(Constants.NAMING_HTTP_HEADER_SPILIER)) { + for (final String s : headers.split(Constants.NAMING_HTTP_HEADER_SPLITTER)) { final String[] splits = s.split(":"); if (splits.length != 2) { continue; diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java index 0643c09c8..badc28dc0 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java @@ -288,7 +288,7 @@ public class ClientWorker implements Closeable { * Check config info. */ public void checkConfigInfo() { - // Dispatch taskes. + // Dispatch tasks. int listenerSize = cacheMap.size(); // Round up the longingTaskCount. int longingTaskCount = (int) Math.ceil(listenerSize / ParamUtil.getPerTaskConfigSize()); @@ -304,7 +304,7 @@ public class ClientWorker implements Closeable { /** * Fetch the dataId list from server. * - * @param cacheDatas CacheDatas for config infomations. + * @param cacheDatas CacheDatas for config information. * @param inInitializingCacheList initial cache lists. * @return String include dataId and group (ps: it maybe null). * @throws Exception Exception. @@ -322,7 +322,7 @@ public class ClientWorker implements Closeable { sb.append(cacheData.getTenant()).append(LINE_SEPARATOR); } if (cacheData.isInitializing()) { - // It updates when cacheData occours in cacheMap by first time. + // It updates when cacheData occurs in cacheMap by first time. inInitializingCacheList .add(GroupKey.getKeyTenant(cacheData.dataId, cacheData.group, cacheData.tenant)); } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/utils/Chooser.java b/client/src/main/java/com/alibaba/nacos/client/naming/utils/Chooser.java index 4e618e2d5..ec7e3a107 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/utils/Chooser.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/utils/Chooser.java @@ -118,7 +118,7 @@ public class Chooser { public Ref(List> itemsWithWeight) { this.itemsWithWeight = itemsWithWeight; } - + /** * Refresh. */ @@ -167,7 +167,7 @@ public class Chooser { return; } throw new IllegalStateException( - "Cumulative Weight caculate wrong , the sum of probabilities does not equals 1."); + "Cumulative Weight calculate wrong , the sum of probabilities does not equals 1."); } @Override diff --git a/cmdb/src/main/java/com/alibaba/nacos/cmdb/service/CmdbReader.java b/cmdb/src/main/java/com/alibaba/nacos/cmdb/service/CmdbReader.java index df711da59..40e75794d 100644 --- a/cmdb/src/main/java/com/alibaba/nacos/cmdb/service/CmdbReader.java +++ b/cmdb/src/main/java/com/alibaba/nacos/cmdb/service/CmdbReader.java @@ -52,7 +52,7 @@ public interface CmdbReader { * * @param labelName name of label * @param labelValue value of label - * @return list of entiy + * @return list of entity */ List queryEntitiesByLabel(String labelName, String labelValue); } diff --git a/common/src/main/java/com/alibaba/nacos/common/utils/CollectionUtils.java b/common/src/main/java/com/alibaba/nacos/common/utils/CollectionUtils.java index 90f52abde..7bbd15ffe 100644 --- a/common/src/main/java/com/alibaba/nacos/common/utils/CollectionUtils.java +++ b/common/src/main/java/com/alibaba/nacos/common/utils/CollectionUtils.java @@ -191,7 +191,7 @@ public final class CollectionUtils { * * @param coll collection * @param target target value - * @param Genreal Type + * @param General Type * @return true if contain, otherwise false */ public static boolean contains(Collection coll, T target) { @@ -236,7 +236,7 @@ public final class CollectionUtils { * @param defaultValue default value * @param General Type * @return the value to which the specified index , or {@code defaultValue} if this collection contains no value for - * the index. + * the index. */ public static T getOrDefault(Collection coll, int index, T defaultValue) { try { diff --git a/config/src/main/java/com/alibaba/nacos/config/server/aspect/CapacityManagementAspect.java b/config/src/main/java/com/alibaba/nacos/config/server/aspect/CapacityManagementAspect.java index c9167ced5..3a271d366 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/aspect/CapacityManagementAspect.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/aspect/CapacityManagementAspect.java @@ -61,7 +61,7 @@ public class CapacityManagementAspect { private PersistService persistService; /** - * Need to judge the size of content whether to exceed the limination. + * Need to judge the size of content whether to exceed the limitation. */ @Around(SYNC_UPDATE_CONFIG_ALL) public Object aroundSyncUpdateConfigAll(ProceedingJoinPoint pjp, HttpServletRequest request, @@ -74,7 +74,7 @@ public class CapacityManagementAspect { String betaIps = request.getHeader("betaIps"); if (StringUtils.isBlank(betaIps)) { if (StringUtils.isBlank(tag)) { - // do capacity management limination check for writting or updating config_info table. + // do capacity management limitation check for writing or updating config_info table. if (persistService.findConfigInfo(dataId, group, tenant) == null) { // Write operation. return do4Insert(pjp, request, response, group, tenant, content); @@ -87,7 +87,7 @@ public class CapacityManagementAspect { } /** - * Update operation: open the limination of capacity management and it will check the size of content. + * Update operation: open the limitation of capacity management and it will check the size of content. * * @throws Throwable Throws Exception when actually operate. */ @@ -109,11 +109,10 @@ public class CapacityManagementAspect { } /** - * Write operation. - * Step 1: count whether to open the limination checking funtion for capacity management; - * Step 2: open limination checking capacity management and check size of content and quota; + * Write operation. Step 1: count whether to open the limitation checking function for capacity management; Step 2: + * open limitation checking capacity management and check size of content and quota; * - * @throws Throwable Expcetion. + * @throws Throwable Exception. */ private Object do4Insert(ProceedingJoinPoint pjp, HttpServletRequest request, HttpServletResponse response, String group, String tenant, String content) throws Throwable { @@ -143,7 +142,8 @@ public class CapacityManagementAspect { } /** - * The usage of capacity table for counting module will subtracte one whether open the limination check of capacity management. + * The usage of capacity table for counting module will subtracte one whether open the limitation check of capacity + * management. */ @Around(DELETE_CONFIG) public Object aroundDeleteConfig(ProceedingJoinPoint pjp, HttpServletRequest request, HttpServletResponse response, @@ -162,7 +162,7 @@ public class CapacityManagementAspect { /** * Delete Operation. * - * @throws Throwable Expcetion. + * @throws Throwable Exception. */ private Object do4Delete(ProceedingJoinPoint pjp, HttpServletResponse response, String group, String tenant, ConfigInfo configInfo) throws Throwable { @@ -181,7 +181,7 @@ public class CapacityManagementAspect { correctUsage(group, tenant, hasTenant); return pjp.proceed(); } - + // The same record can be deleted concurrently. This interface can be deleted asynchronously(submit MergeDataTask // to MergeTaskProcessor for processing), It may lead to more than one decrease in usage. // Therefore, it is necessary to modify the usage job regularly. @@ -221,7 +221,7 @@ public class CapacityManagementAspect { } /** - * Usage counting service: it will count whether the limination check funtion will be open. + * Usage counting service: it will count whether the limitation check function will be open. */ private void insertOrUpdateUsage(String group, String tenant, CounterMode counterMode, boolean hasTenant) { try { @@ -333,13 +333,13 @@ public class CapacityManagementAspect { if (capacity != null) { Integer maxSize = getMaxSize(isAggr, capacity); if (maxSize == 0) { - // If there exists capacity info and maxSize = 0, then it uses maxSize limination default value to compare. + // If there exists capacity info and maxSize = 0, then it uses maxSize limitation default value to compare. return isOverSize(group, tenant, currentSize, defaultMaxSize, hasTenant); } // If there exists capacity info, then maxSize!=0. return isOverSize(group, tenant, currentSize, maxSize, hasTenant); } - // If there no exists capacity info, then it uses maxSize limination default value to compare. + // If there no exists capacity info, then it uses maxSize limitation default value to compare. return isOverSize(group, tenant, currentSize, defaultMaxSize, hasTenant); } @@ -420,7 +420,7 @@ public class CapacityManagementAspect { } /** - * limit tyep. + * limit type. * * @author Nacos. */ diff --git a/config/src/main/java/com/alibaba/nacos/config/server/controller/CapacityController.java b/config/src/main/java/com/alibaba/nacos/config/server/controller/CapacityController.java index be71539a1..9eecb92a0 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/controller/CapacityController.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/controller/CapacityController.java @@ -90,7 +90,7 @@ public class CapacityController { } /** - * Modify group or capacity of tenant, and init record when capacity informations are still initial. + * Modify group or capacity of tenant, and init record when capacity information are still initial. */ @PostMapping public RestResult updateCapacity(HttpServletResponse response, diff --git a/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java b/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java index abab625fe..55c6d444c 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java @@ -153,7 +153,7 @@ public class ConfigController { ParamUtils.checkParam(configAdvanceInfo); if (AggrWhitelist.isAggrDataId(dataId)) { - LOGGER.warn("[aggr-conflict] {} attemp to publish single data, {}, {}", RequestUtil.getRemoteIp(request), + LOGGER.warn("[aggr-conflict] {} attempt to publish single data, {}, {}", RequestUtil.getRemoteIp(request), dataId, group); throw new NacosException(NacosException.NO_RIGHT, "dataId:" + dataId + " is aggr"); } @@ -185,7 +185,7 @@ public class ConfigController { } /** - * Get configure board infomation fail. + * Get configure board information fail. * * @throws ServletException ServletException. * @throws IOException IOException. @@ -666,14 +666,14 @@ public class ConfigController { List configInfoList4Clone = new ArrayList<>(queryedDataList.size()); for (ConfigAllInfo ci : queryedDataList) { - SameNamespaceCloneConfigBean prarmBean = configBeansMap.get(ci.getId()); + SameNamespaceCloneConfigBean paramBean = configBeansMap.get(ci.getId()); ConfigAllInfo ci4save = new ConfigAllInfo(); ci4save.setTenant(namespace); ci4save.setType(ci.getType()); - ci4save.setGroup((prarmBean != null && StringUtils.isNotBlank(prarmBean.getGroup())) ? prarmBean.getGroup() + ci4save.setGroup((paramBean != null && StringUtils.isNotBlank(paramBean.getGroup())) ? paramBean.getGroup() : ci.getGroup()); ci4save.setDataId( - (prarmBean != null && StringUtils.isNotBlank(prarmBean.getDataId())) ? prarmBean.getDataId() + (paramBean != null && StringUtils.isNotBlank(paramBean.getDataId())) ? paramBean.getDataId() : ci.getDataId()); ci4save.setContent(ci.getContent()); if (StringUtils.isNotBlank(ci.getAppName())) { diff --git a/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigServletInner.java b/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigServletInner.java index 85c490b77..9b414c9e4 100755 --- a/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigServletInner.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigServletInner.java @@ -97,7 +97,7 @@ public class ConfigServletInner { } int versionNum = Protocol.getVersionNumber(version); - // Befor 2.0.4 version, return value is put into header. + // Before 2.0.4 version, return value is put into header. if (versionNum < START_LONG_POLLING_VERSION_NUM) { response.addHeader(Constants.PROBE_MODIFY_RESPONSE, oldResult); response.addHeader(Constants.PROBE_MODIFY_RESPONSE_NEW, newResult); @@ -137,14 +137,14 @@ public class ConfigServletInner { if (cacheItem.isBeta() && cacheItem.getIps4Beta().contains(clientIp)) { isBeta = true; } - + final String configType = (null != cacheItem.getType()) ? cacheItem.getType() : FileTypeEnum.TEXT.getFileType(); response.setHeader("Config-Type", configType); FileTypeEnum fileTypeEnum = FileTypeEnum.getFileTypeEnumByFileExtensionOrFileType(configType); String contentTypeHeader = fileTypeEnum.getContentType(); response.setHeader(HttpHeaderConsts.CONTENT_TYPE, contentTypeHeader); - + File file = null; ConfigInfoBase configInfoBase = null; PrintWriter out = null; @@ -295,9 +295,10 @@ public class ConfigServletInner { private static void releaseConfigReadLock(String groupKey) { ConfigCacheService.releaseReadLock(groupKey); } - + /** * Try to add read lock. + * * @param groupKey groupKey string value. * @return 0 - No data and failed. Positive number - lock succeeded. Negative number - lock failed。 */ diff --git a/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfoBase.java b/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfoBase.java index e8615b5ce..f9d5e1b95 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfoBase.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfoBase.java @@ -26,7 +26,7 @@ import java.io.Serializable; /** * ConfigInfoBase. - * And can't add field, to compatible with old interface(If adding a field, then it will occour compatibility problems). + * And can't add field, to compatible with old interface(If adding a field, then it will occur compatibility problems). * * @author Nacos */ diff --git a/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfoBaseEx.java b/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfoBaseEx.java index d65c50ac7..68d4e9429 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfoBaseEx.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfoBaseEx.java @@ -18,7 +18,7 @@ package com.alibaba.nacos.config.server.model; /** * ConfigInfoBaseEx. - * And can't add field, to compatible with old interface(If adding a field, then it will occour compatibility problems). + * And can't add field, to compatible with old interface(If adding a field, then it will occur compatibility problems). * * @author Nacos */ diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/ClientTrackService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/ClientTrackService.java index bba5f0dbc..6ab74a3ef 100755 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/ClientTrackService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/ClientTrackService.java @@ -42,8 +42,8 @@ public class ClientTrackService { /** * TrackClientMd5. * - * @param ip ip string value. - * @param clientMd5Map clientMd5Map. + * @param ip ip string value. + * @param clientMd5Map clientMd5Map. * @param clientLastPollingTsMap clientLastPollingTsMap. */ public static void trackClientMd5(String ip, Map clientMd5Map, @@ -57,8 +57,8 @@ public class ClientTrackService { /** * Put the specified value(ip/groupKey/clientMd5) into clientRecords Map. * - * @param ip ip string value. - * @param groupKey groupKey string value. + * @param ip ip string value. + * @param groupKey groupKey string value. * @param clientMd5 clientMd5 string value. */ public static void trackClientMd5(String ip, String groupKey, String clientMd5) { @@ -76,11 +76,11 @@ public class ClientTrackService { public static int subscribeClientCount() { return clientRecords.size(); } - + /** - * Get all of subsciber count. + * Get all of subscriber count. * - * @return all of subsciber count. + * @return all of subscriber count. */ public static long subscriberCount() { long count = 0; @@ -92,7 +92,6 @@ public class ClientTrackService { /** * Groupkey -> SubscriberStatus. - * */ public static Map listSubStatus(String ip) { Map status = new HashMap(100); @@ -134,9 +133,8 @@ public class ClientTrackService { } /** - * Specify subscriber's ip and look up whether data is lastest. + * Specify subscriber's ip and look up whether data is latest. * groupKey -> isUptodate. - * */ public static Map isClientUptodate(String ip) { Map result = new HashMap(100); @@ -150,7 +148,7 @@ public class ClientTrackService { } /** - * Specify groupKey and look up whether subsciber and data is lastest. + * Specify groupKey and look up whether subscriber and data is latest. * IP -> isUptodate. */ public static Map listSubscriberByGroup(String groupKey) { diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigCacheService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigCacheService.java index 6cc420cf5..16a6c49b0 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigCacheService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigCacheService.java @@ -231,8 +231,8 @@ public class ConfigCacheService { try { final String md5 = MD5Utils.md5Hex(content, Constants.ENCODE); if (!PropertyUtil.isDirectRead()) { - String loacalMd5 = DiskUtil.getLocalConfigMd5(dataId, group, tenant); - if (md5.equals(loacalMd5)) { + String localMd5 = DiskUtil.getLocalConfigMd5(dataId, group, tenant); + if (md5.equals(localMd5)) { DUMP_LOG.warn("[dump-ignore] ignore to save cache file. groupKey={}, md5={}, lastModifiedOld={}, " + "lastModifiedNew={}", groupKey, md5, ConfigCacheService.getLastModifiedTs(groupKey), lastModifiedTs); diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java index ba2afba5a..c71196c25 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java @@ -129,26 +129,26 @@ public class ConfigSubService { */ public SampleResult mergeSampleResult(SampleResult sampleCollectResult, List sampleResults) { SampleResult mergeResult = new SampleResult(); - Map lisentersGroupkeyStatus = null; + Map listenersGroupkeyStatus = null; if (sampleCollectResult.getLisentersGroupkeyStatus() == null || sampleCollectResult.getLisentersGroupkeyStatus() .isEmpty()) { - lisentersGroupkeyStatus = new HashMap(10); + listenersGroupkeyStatus = new HashMap(10); } else { - lisentersGroupkeyStatus = sampleCollectResult.getLisentersGroupkeyStatus(); + listenersGroupkeyStatus = sampleCollectResult.getLisentersGroupkeyStatus(); } for (SampleResult sampleResult : sampleResults) { - Map lisentersGroupkeyStatusTmp = sampleResult.getLisentersGroupkeyStatus(); - for (Map.Entry entry : lisentersGroupkeyStatusTmp.entrySet()) { - lisentersGroupkeyStatus.put(entry.getKey(), entry.getValue()); + Map listenersGroupkeyStatusTmp = sampleResult.getLisentersGroupkeyStatus(); + for (Map.Entry entry : listenersGroupkeyStatusTmp.entrySet()) { + listenersGroupkeyStatus.put(entry.getKey(), entry.getValue()); } } - mergeResult.setLisentersGroupkeyStatus(lisentersGroupkeyStatus); + mergeResult.setLisentersGroupkeyStatus(listenersGroupkeyStatus); return mergeResult; } /** - * Query subsrciber's task from every nacos server nodes. + * Query subscriber's task from every nacos server nodes. * * @author Nacos */ @@ -177,8 +177,7 @@ public class ConfigSubService { } String urlAll = getUrl(ip, url) + "?" + paramUrl; - RestResult result = NotifyService - .invokeURL(urlAll, null, Constants.ENCODE); + RestResult result = NotifyService.invokeURL(urlAll, null, Constants.ENCODE); // Http code 200 if (result.ok()) { diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/ApiController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/ApiController.java index dfce95127..cd8fe4671 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/ApiController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/ApiController.java @@ -126,7 +126,7 @@ public class ApiController extends InstanceController { * Get service ips. * * @param request http request - * @return service detail infomation + * @return service detail information * @throws Exception exception */ @RequestMapping("/srvIPXT") diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/CatalogController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/CatalogController.java index c36b8541b..a85fc7b1b 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/CatalogController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/CatalogController.java @@ -116,7 +116,7 @@ public class CatalogController { Service service = serviceManager.getService(namespaceId, serviceName); if (service == null) { - throw new NacosException(NacosException.NOT_FOUND, "serivce " + serviceName + " is not found!"); + throw new NacosException(NacosException.NOT_FOUND, "service " + serviceName + " is not found!"); } if (!service.getClusterMap().containsKey(clusterName)) { diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java index d25db58de..0547d1445 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java @@ -93,7 +93,7 @@ public class UtilsAndCommons { public static final String SELF_SERVICE_CLUSTER_ENV = "naming_self_service_cluster_ips"; - public static final String CACHE_KEY_SPLITER = "@@@@"; + public static final String CACHE_KEY_SPLITTER = "@@@@"; public static final int MAX_PUBLISH_WAIT_TIME_MILLIS = 5000; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java b/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java index 8a10102d9..05f3d7e98 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java @@ -362,7 +362,7 @@ public class PushService implements ApplicationContextAware, ApplicationListener } public static String getPushCacheKey(String serviceName, String clientIP, String agent) { - return serviceName + UtilsAndCommons.CACHE_KEY_SPLITER + agent; + return serviceName + UtilsAndCommons.CACHE_KEY_SPLITTER + agent; } /** diff --git a/test/src/test/java/com/alibaba/nacos/test/config/ConfigAPI_CITCase.java b/test/src/test/java/com/alibaba/nacos/test/config/ConfigAPI_CITCase.java index d8446f52c..b6f285b0f 100644 --- a/test/src/test/java/com/alibaba/nacos/test/config/ConfigAPI_CITCase.java +++ b/test/src/test/java/com/alibaba/nacos/test/config/ConfigAPI_CITCase.java @@ -366,7 +366,7 @@ public class ConfigAPI_CITCase { Listener ml = new Listener() { @Override public void receiveConfigInfo(String configInfo) { - System.out.println("recieve23:" + configInfo); + System.out.println("receive23:" + configInfo); count.incrementAndGet(); Assert.assertEquals(content, configInfo); } @@ -582,7 +582,7 @@ public class ConfigAPI_CITCase { iconfig.removeListener(dataId, group, new AbstractListener() { @Override public void receiveConfigInfo(String configInfo) { - System.out.println("remove recieve:" + configInfo); + System.out.println("remove receive:" + configInfo); } }); } catch (Exception e) { @@ -633,7 +633,7 @@ public class ConfigAPI_CITCase { Listener ml1 = new AbstractListener() { @Override public void receiveConfigInfo(String configInfo) { - //System.out.println("ml1 remove listener recieve:" + configInfo); + //System.out.println("ml1 remove listener receive:" + configInfo); count.incrementAndGet(); Assert.assertEquals(contentRemove, configInfo); }