This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 4571a853a2 reduce duplicate calls (#9037)
4571a853a2 is described below
commit 4571a853a2e0b5be4e4d94d9a9865f235a2c9c76
Author: irotuk <[email protected]>
AuthorDate: Mon Dec 9 14:32:37 2024 +0800
reduce duplicate calls (#9037)
Co-authored-by: noreply <[email protected]>
---
srvutil/src/main/java/org/apache/rocketmq/srvutil/FileWatchService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/srvutil/src/main/java/org/apache/rocketmq/srvutil/FileWatchService.java
b/srvutil/src/main/java/org/apache/rocketmq/srvutil/FileWatchService.java
index 06c301bec9..0c0690da5c 100644
--- a/srvutil/src/main/java/org/apache/rocketmq/srvutil/FileWatchService.java
+++ b/srvutil/src/main/java/org/apache/rocketmq/srvutil/FileWatchService.java
@@ -64,7 +64,7 @@ public class FileWatchService extends
LifecycleAwareServiceThread {
this.waitForRunning(WATCH_INTERVAL);
for (Map.Entry<String, String> entry : currentHash.entrySet())
{
String newHash = md5Digest(entry.getKey());
- if (!newHash.equals(currentHash.get(entry.getKey()))) {
+ if (!newHash.equals(entry.getValue())) {
entry.setValue(newHash);
listener.onChanged(entry.getKey());
}