caigy commented on a change in pull request #3761:
URL: https://github.com/apache/rocketmq/pull/3761#discussion_r805465656



##########
File path: 
srvutil/src/main/java/org/apache/rocketmq/srvutil/AclFileWatchService.java
##########
@@ -40,19 +40,24 @@
     private int aclFilesNum;
     @Deprecated
     private final Map<String, String> fileCurrentHash;
-    private final Map<String, Long> fileLastModifiedTime;
+    private Map<String, Long> fileLastModifiedTime;
     private List<String/**absolute pathname **/> fileList = new ArrayList<>();
     private final AclFileWatchService.Listener listener;
     private static final int WATCH_INTERVAL = 5000;
     private MessageDigest md = MessageDigest.getInstance("MD5");
+    private String defaultAclFile;
 
     public AclFileWatchService(String path, final AclFileWatchService.Listener 
listener) throws Exception {
         this.aclPath = path;
+        this.defaultAclFile = path.substring(0, path.length() - 4) + 
System.getProperty("rocketmq.acl.plain.file", "conf/plain_acl.yml");

Review comment:
       Just get parent directory instead of string truncation, or make `path` 
as a `List`.




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