This is an automated email from the ASF dual-hosted git repository.
szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis.git
The following commit(s) were added to refs/heads/master by this push:
new 256fc2a51 RATIS-1991. Optimize the reconfig judgment logic in the
ReconfigurationBase class. (#1004)
256fc2a51 is described below
commit 256fc2a511d0cb201d1c1a6821a1a47d21fd92e1
Author: huangzhaobo <[email protected]>
AuthorDate: Tue Jan 9 10:18:26 2024 +0800
RATIS-1991. Optimize the reconfig judgment logic in the ReconfigurationBase
class. (#1004)
---
.../src/main/java/org/apache/ratis/conf/ReconfigurationBase.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/ratis-common/src/main/java/org/apache/ratis/conf/ReconfigurationBase.java
b/ratis-common/src/main/java/org/apache/ratis/conf/ReconfigurationBase.java
index 6d4930e67..8123e2414 100644
--- a/ratis-common/src/main/java/org/apache/ratis/conf/ReconfigurationBase.java
+++ b/ratis-common/src/main/java/org/apache/ratis/conf/ReconfigurationBase.java
@@ -172,7 +172,7 @@ public abstract class ReconfigurationBase implements
Reconfigurable {
}
final String effective = reconfigureProperty(property, newValue);
LOG.info("{}: changed property {} to {} (effective {})", name, property,
newValue, effective);
- if (newValue != null) {
+ if (effective != null) {
properties.set(property, effective);
} else {
properties.unset(property);