diff --git a/acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java b/acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java index 245bd9e750310ce11a2d1f75b1bde8e1cdd0eb0f..f1db0f4cc3a7aba82af4440290fe375797894c89 100644 --- a/acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java +++ b/acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java @@ -134,7 +134,7 @@ public class PlainPermissionManager { Map aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName, Map.class); if (aclAccessConfigMap == null || aclAccessConfigMap.isEmpty()) { - throw new AclException(String.format("%s file not found or empty", fileHome + File.separator + fileName)); + throw new AclException(String.format("the %s file is not found or empty", fileHome + File.separator + fileName)); } List> accounts = (List>) aclAccessConfigMap.get(AclConstants.CONFIG_ACCOUNTS); Map updateAccountMap = null; @@ -166,14 +166,14 @@ public class PlainPermissionManager { return false; } - private Map createAclAccessConfigMap(Map existedAccoutMap, + private Map createAclAccessConfigMap(Map existedAccountMap, PlainAccessConfig plainAccessConfig) { Map newAccountsMap = null; - if (existedAccoutMap == null) { + if (existedAccountMap == null) { newAccountsMap = new LinkedHashMap(); } else { - newAccountsMap = existedAccoutMap; + newAccountsMap = existedAccountMap; } if (StringUtils.isEmpty(plainAccessConfig.getAccessKey()) || @@ -223,7 +223,7 @@ public class PlainPermissionManager { Map aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName, Map.class); if (aclAccessConfigMap == null || aclAccessConfigMap.isEmpty()) { - throw new AclException(String.format("%s file not found or empty", fileHome + File.separator + fileName)); + throw new AclException(String.format("the %s file is not found or empty", fileHome + File.separator + fileName)); } List> accounts = (List>) aclAccessConfigMap.get("accounts"); if (accounts != null) { @@ -257,7 +257,7 @@ public class PlainPermissionManager { Map aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName, Map.class); if (aclAccessConfigMap == null || aclAccessConfigMap.isEmpty()) { - throw new AclException(String.format("%s file not found or empty", fileHome + File.separator + fileName)); + throw new AclException(String.format("the %s file is not found or empty", fileHome + File.separator + fileName)); } List globalWhiteRemoteAddrList = (List) aclAccessConfigMap.get(AclConstants.CONFIG_GLOBAL_WHITE_ADDRS);