提交 99b69abe 编写于 作者: S shendong

Merge branch 'develop' of https://github.com/shendongsd/rocketmq into develop

...@@ -134,7 +134,7 @@ public class PlainPermissionManager { ...@@ -134,7 +134,7 @@ public class PlainPermissionManager {
Map<String, Object> aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName, Map<String, Object> aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName,
Map.class); Map.class);
if (aclAccessConfigMap == null || aclAccessConfigMap.isEmpty()) { 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<Map<String, Object>> accounts = (List<Map<String, Object>>) aclAccessConfigMap.get(AclConstants.CONFIG_ACCOUNTS); List<Map<String, Object>> accounts = (List<Map<String, Object>>) aclAccessConfigMap.get(AclConstants.CONFIG_ACCOUNTS);
Map<String, Object> updateAccountMap = null; Map<String, Object> updateAccountMap = null;
...@@ -166,14 +166,14 @@ public class PlainPermissionManager { ...@@ -166,14 +166,14 @@ public class PlainPermissionManager {
return false; return false;
} }
private Map<String, Object> createAclAccessConfigMap(Map<String, Object> existedAccoutMap, private Map<String, Object> createAclAccessConfigMap(Map<String, Object> existedAccountMap,
PlainAccessConfig plainAccessConfig) { PlainAccessConfig plainAccessConfig) {
Map<String, Object> newAccountsMap = null; Map<String, Object> newAccountsMap = null;
if (existedAccoutMap == null) { if (existedAccountMap == null) {
newAccountsMap = new LinkedHashMap<String, Object>(); newAccountsMap = new LinkedHashMap<String, Object>();
} else { } else {
newAccountsMap = existedAccoutMap; newAccountsMap = existedAccountMap;
} }
if (StringUtils.isEmpty(plainAccessConfig.getAccessKey()) || if (StringUtils.isEmpty(plainAccessConfig.getAccessKey()) ||
...@@ -223,7 +223,7 @@ public class PlainPermissionManager { ...@@ -223,7 +223,7 @@ public class PlainPermissionManager {
Map<String, Object> aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName, Map<String, Object> aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName,
Map.class); Map.class);
if (aclAccessConfigMap == null || aclAccessConfigMap.isEmpty()) { 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<Map<String, Object>> accounts = (List<Map<String, Object>>) aclAccessConfigMap.get("accounts"); List<Map<String, Object>> accounts = (List<Map<String, Object>>) aclAccessConfigMap.get("accounts");
if (accounts != null) { if (accounts != null) {
...@@ -257,7 +257,7 @@ public class PlainPermissionManager { ...@@ -257,7 +257,7 @@ public class PlainPermissionManager {
Map<String, Object> aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName, Map<String, Object> aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName,
Map.class); Map.class);
if (aclAccessConfigMap == null || aclAccessConfigMap.isEmpty()) { 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<String> globalWhiteRemoteAddrList = (List<String>) aclAccessConfigMap.get(AclConstants.CONFIG_GLOBAL_WHITE_ADDRS); List<String> globalWhiteRemoteAddrList = (List<String>) aclAccessConfigMap.get(AclConstants.CONFIG_GLOBAL_WHITE_ADDRS);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册