Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make ConfigChangeEvent immutable: remove setters and set all fields to final #3403

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {
beiwei30 marked this conversation as resolved.
Show resolved Hide resolved
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;
}
}
}