From 570064a5883c27a0001c93e0b623ad4a7ded07fe Mon Sep 17 00:00:00 2001 From: lbw Date: Fri, 22 Apr 2022 15:33:12 +0800 Subject: [PATCH] :art: Improving structure / format of the code. --- .../dashboard/controller/MachineRegistryController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pig-visual/pig-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/MachineRegistryController.java b/pig-visual/pig-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/MachineRegistryController.java index a3094eba..c240d1ca 100644 --- a/pig-visual/pig-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/MachineRegistryController.java +++ b/pig-visual/pig-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/MachineRegistryController.java @@ -51,9 +51,9 @@ public class MachineRegistryController { if (StringUtil.isBlank(ip) || ip.length() > 128) { return Result.ofFail(-1, "invalid ip: " + ip); } - if (!InetAddressUtils.isIPv4Address(ip) && !InetAddressUtils.isIPv6Address(ip)) { - return Result.ofFail(-1, "invalid ip: " + ip); - } + if (!InetAddressUtils.isIPv4Address(ip) && !InetAddressUtils.isIPv6Address(ip)) { + return Result.ofFail(-1, "invalid ip: " + ip); + } if (port == null || port < -1) { return Result.ofFail(-1, "invalid port"); }