This is an automated email from the ASF dual-hosted git repository.

iluo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b89d41  make ConfigChangeEvent immutable (#3403)
9b89d41 is described below

commit 9b89d41bc83b5aa5bd435ce6b15b1c061b0f8012
Author: wanghbxxxx <[email protected]>
AuthorDate: Thu Jan 31 11:23:29 2019 +0800

    make ConfigChangeEvent immutable (#3403)
---
 .../dubbo/configcenter/ConfigChangeEvent.java       | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git 
a/dubbo-configcenter/dubbo-configcenter-api/src/main/java/org/apache/dubbo/configcenter/ConfigChangeEvent.java
 
b/dubbo-configcenter/dubbo-configcenter-api/src/main/java/org/apache/dubbo/configcenter/ConfigChangeEvent.java
index 9502275..4a2190a 100644
--- 
a/dubbo-configcenter/dubbo-configcenter-api/src/main/java/org/apache/dubbo/configcenter/ConfigChangeEvent.java
+++ 
b/dubbo-configcenter/dubbo-configcenter-api/src/main/java/org/apache/dubbo/configcenter/ConfigChangeEvent.java
@@ -17,15 +17,15 @@
 package org.apache.dubbo.configcenter;
 
 /**
- * Config change event.
+ * Config change event, immutable.
  *
  * @see ConfigChangeType
  */
 public class ConfigChangeEvent {
-    private String key;
+    private final String key;
 
-    private String value;
-    private ConfigChangeType changeType;
+    private final String value;
+    private final ConfigChangeType changeType;
 
     public ConfigChangeEvent(String key, String value) {
         this(key, value, ConfigChangeType.MODIFIED);
@@ -41,23 +41,12 @@ public class ConfigChangeEvent {
         return key;
     }
 
-    public void setKey(String key) {
-        this.key = key;
-    }
-
     public String getValue() {
         return value;
     }
 
-    public void setValue(String value) {
-        this.value = value;
-    }
-
     public ConfigChangeType getChangeType() {
         return changeType;
     }
 
-    public void setChangeType(ConfigChangeType changeType) {
-        this.changeType = changeType;
-    }
-}
+}
\ No newline at end of file

Reply via email to