优化代码 删除冗余的局部变量‘address’

Signed-off-by: 梁剑锋 <1822213252@qq.com>
This commit is contained in:
梁剑锋 2022-11-21 07:41:20 +00:00 committed by Gitee
parent 842af57d74
commit d9e7086b17
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -28,9 +28,8 @@ public class AddressUtils {
public static final String UNKNOWN = "XX XX";
public static String getRealAddressByIP(String ip) {
String address = UNKNOWN;
if (StringUtils.isBlank(ip)) {
return address;
return UNKNOWN;
}
// 内网不查询
ip = "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : HtmlUtil.cleanHtmlTag(ip);