refactor(nacos-client:config): remove un use constructor

This commit is contained in:
chuntaojun 2019-06-11 10:01:55 +08:00
parent dd9676c2e4
commit be3cb036a2

View File

@ -447,21 +447,6 @@ class ServerAddressIterator implements Iterator<String> {
iter = sorted.iterator();
}
// Consider adding a penalty mechanism, with the offending node coming last
public ServerAddressIterator(List<String> source, String errServerIp) {
sorted = new ArrayList<RandomizedServerAddress>();
for (String address : source) {
if (address.equals(errServerIp)) {
continue;
}
sorted.add(new RandomizedServerAddress(address));
}
Collections.sort(sorted);
sorted.add(new RandomizedServerAddress(errServerIp));
iter = sorted.iterator();
}
@Override
public boolean hasNext() {
return iter.hasNext();