mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-23 05:00:23 +08:00
⚡ 优化, 删除sun.net.util 兼容JDK11
This commit is contained in:
parent
aba6d47c4b
commit
84b5a7fb54
@ -29,7 +29,6 @@ import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import sun.net.util.IPAddressUtil;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "/registry", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ -51,9 +50,7 @@ public class MachineRegistryController {
|
||||
if (StringUtil.isBlank(ip) || ip.length() > 128) {
|
||||
return Result.ofFail(-1, "invalid ip: " + ip);
|
||||
}
|
||||
if (!IPAddressUtil.isIPv4LiteralAddress(ip) && !IPAddressUtil.isIPv6LiteralAddress(ip)) {
|
||||
return Result.ofFail(-1, "invalid ip: " + ip);
|
||||
}
|
||||
|
||||
if (port == null || port < -1) {
|
||||
return Result.ofFail(-1, "invalid port");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user