remove useless validate code

This commit is contained in:
Albert-Hugo 2019-04-20 10:35:01 +08:00
parent 2cb387892a
commit e6f82a940e

View File

@ -297,13 +297,6 @@ public class Instance extends com.alibaba.nacos.api.naming.pojo.Instance impleme
public boolean validate() { public boolean validate() {
if (getIp().contains(UtilsAndCommons.IP_PORT_SPLITER)) {
Matcher matcher = IP_PATTERN.matcher(getIp() + ":" + getPort());
if (!matcher.matches()) {
return false;
}
}
if (getWeight() > MAX_WEIGHT_VALUE || getWeight() < MIN_WEIGHT_VALUE) { if (getWeight() > MAX_WEIGHT_VALUE || getWeight() < MIN_WEIGHT_VALUE) {
return false; return false;
} }