yuz10 opened a new issue #3887:
URL: https://github.com/apache/rocketmq/issues/3887


   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
    
   - What did you do (The steps to reproduce)?
   1. call updateAccessConfig to update acl
   2. the file watcher calls PlainPermissionManager::load(String aclFilePath)
   3. and in load() function, the plainAccessResourceMap will not put new acl 
because the condition 
`this.accessKeyTable.get(plainAccessResource.getAccessKey()) `is not null
   ```
                   if 
(this.accessKeyTable.get(plainAccessResource.getAccessKey()) == null) {
                       
plainAccessResourceMap.put(plainAccessResource.getAccessKey(), 
plainAccessResource);
                       
this.accessKeyTable.put(plainAccessResource.getAccessKey(), aclFilePath);
                   }
   ```
   - What did you expect to see?
   
   - What did you see instead?
   see the error:
   ```
   java.lang.NullPointerException
        at 
org.apache.rocketmq.acl.plain.PlainPermissionManager.validate(PlainPermissionManager.java:646)
        at 
org.apache.rocketmq.acl.plain.PlainAccessValidator.validate(PlainAccessValidator.java:141)
        at 
org.apache.rocketmq.acl.plain.PlainAccessValidatorTest.testValidateAfterUpdateAccessConfig(PlainAccessValidatorTest.java:942)
   ```
   4. Please tell us about your environment:
   
   5. Other information (e.g. detailed explanation, logs, related issues, 
suggestions how to fix, etc):
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to