You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/05/21 01:43:09 UTC

[GitHub] [rocketmq] ShannonDing commented on a change in pull request #2893: fix the problem of potential NPE in ACL plain

ShannonDing commented on a change in pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#discussion_r636579404



##########
File path: acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java
##########
@@ -133,7 +133,9 @@ public boolean updateAccessConfig(PlainAccessConfig plainAccessConfig) {
 
         Map<String, Object> 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));

Review comment:
       "the xxx file  **is** not found or empty " seems better.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org