Use TreeMap to cal revision (#6869)

* remove not used classes.

* support service discovery unsubscribe and re-refer

* add publishInterface config item to ApplicationConfig

* remove useless class definition

* fix service instance equals bug

* use ordered treemap to cal revision.
This commit is contained in:
ken.lj 2020-11-06 14:30:30 +08:00 committed by GitHub
parent 924ee551fb
commit f8df0cbf59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -31,6 +31,7 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
@ -97,7 +98,7 @@ public class MetadataInfo implements Serializable {
StringBuilder sb = new StringBuilder();
sb.append(app);
for (Map.Entry<String, ServiceInfo> entry : services.entrySet()) {
for (Map.Entry<String, ServiceInfo> entry : new TreeMap<>(services).entrySet()) {
sb.append(entry.getValue().toDescString());
}
this.revision = RevisionResolver.calRevision(sb.toString());
@ -365,7 +366,7 @@ public class MetadataInfo implements Serializable {
}
public String toDescString() {
return this.getMatchKey() + getMethodSignaturesString() + getParams();
return this.getMatchKey() + getMethodSignaturesString() + new TreeMap<>(getParams());
}
private String getMethodSignaturesString() {