8000 [ISSUE #1107] Quick fixing for the cluster deserialization issue by jifengnan · Pull Request #1233 · alibaba/nacos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[ISSUE #1107] Quick fixing for the cluster deserialization issue #1233

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

Merged
merged 1 commit into from
May 17, 2019
Merged
Show file tree
Hide file tree
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 @@ -62,6 +62,9 @@ public class Cluster extends com.alibaba.nacos.api.naming.pojo.Cluster implement

private Map<String, String> metadata = new ConcurrentHashMap<>();

public Cluster() {
}

/**
* Create a cluster.
* <p>the cluster name cannot be null, and only the arabic numerals, letters and endashes are allowed.
Expand Down Expand Up @@ -138,7 +141,7 @@ public void setService(Service service) {
}

/**
* this method has been deprecated, the service name is not allowed to change.
* this method has been deprecated, the service name shouldn't be changed.
*
* @param serviceName the service name
* @author jifengnan 2019-04-26
Expand All @@ -147,7 +150,7 @@ public void setService(Service service) {
@Deprecated
@Override
public void setServiceName(String serviceName) {
throw new UnsupportedOperationException("This method has been deprecated, the service name is not allowed to change.");
super.setServiceName(serviceName);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,4 @@ public void testValidateServiceNull() {
cluster.validate();
}

@Test(expected = UnsupportedOperationException.class)
public void testSetServiceName() {
Service service = new Service("nacos.service.2");
cluster = new Cluster("nacos-cluster-1", service);
cluster.setServiceName(null);
}
}
0