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 2022/05/11 16:58:22 UTC

[GitHub] [rocketmq] HScarb opened a new pull request, #4276: [ISSUE #4167] Remove similar code in PlainPermissionManager

HScarb opened a new pull request, #4276:
URL: https://github.com/apache/rocketmq/pull/4276

   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   #4167 
   
   Optimize similar codes of `PlainPermissionManager#load`
   
   ## Brief changelog
   
   Call `load(String aclFilePath)` in `load()` method instead of using a bunch of similar code in `load(String aclFilePath)`
   
   ## Verifying this change
   
   ![image](https://user-images.githubusercontent.com/10664298/167905550-b2e21d1e-0408-467a-9456-1945c1e2b1a7.png)
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] closed pull request #4276: [ISSUE #4167] Remove similar code in PlainPermissionManager

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #4276: [ISSUE #4167] Remove similar code in PlainPermissionManager
URL: https://github.com/apache/rocketmq/pull/4276


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] coveralls commented on pull request #4276: [ISSUE #4167] Remove similar code in PlainPermissionManager

Posted by GitBox <gi...@apache.org>.
coveralls commented on PR #4276:
URL: https://github.com/apache/rocketmq/pull/4276#issuecomment-1125347851

   
   [![Coverage Status](https://coveralls.io/builds/49078491/badge)](https://coveralls.io/builds/49078491)
   
   Coverage decreased (-0.06%) to 52.061% when pulling **4ad141b6ea7daf3e14c0620b07aa8ee731ac3347 on HScarb:fix_style_permission** into **5d2bf3573c683eb08f028b3a6496d1cbfe1af33b on apache:develop**.
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] commented on pull request #4276: [ISSUE #4167] Remove similar code in PlainPermissionManager

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #4276:
URL: https://github.com/apache/rocketmq/pull/4276#issuecomment-1262959475

   This PR was closed because it has been inactive for 3 days since being marked as stale.


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] yuz10 commented on a diff in pull request #4276: [ISSUE #4167] Remove similar code in PlainPermissionManager

Posted by GitBox <gi...@apache.org>.
yuz10 commented on code in PR #4276:
URL: https://github.com/apache/rocketmq/pull/4276#discussion_r871092714


##########
acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java:
##########
@@ -113,11 +114,11 @@ public void load() {
             return;
         }
 
-        Map<String, Map<String, PlainAccessResource>> aclPlainAccessResourceMap = new HashMap<>();
-        Map<String, String> accessKeyTable = new HashMap<>();
-        List<RemoteAddressStrategy> globalWhiteRemoteAddressStrategy = new ArrayList<>();
-        Map<String, List<RemoteAddressStrategy>> globalWhiteRemoteAddressStrategyMap = new HashMap<>();
-        Map<String, DataVersion> dataVersionMap = new HashMap<>();
+        this.aclPlainAccessResourceMap = new HashMap<>();
+        this.accessKeyTable = new HashMap<>();
+        this.globalWhiteRemoteAddressStrategy = new ArrayList<>();
+        this.globalWhiteRemoteAddressStrategyMap = new HashMap<>();
+        this.dataVersionMap = new HashMap<>();

Review Comment:
   Better update these fields after read from file.



-- 
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: dev-unsubscribe@rocketmq.apache.org

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