Skip to content

Commit

Permalink
make ConfigChangeEvent immutable (#3403)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghbxxxx authored and beiwei30 committed Jan 31, 2019
1 parent 93a8ee0 commit 9b89d41
Showing 1 changed file with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -41,23 +41,12 @@ public String getKey() {
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;
}
}
}

0 comments on commit 9b89d41

Please sign in to comment.