【fix sonar】IPUtils文件
This commit is contained in:
+4
-6
@@ -50,12 +50,10 @@ public class IPUtils {
|
|||||||
logger.error("IPUtils ERROR ", e);
|
logger.error("IPUtils ERROR ", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// //使用代理,则获取第一个IP地址
|
//使用代理,则获取第一个IP地址
|
||||||
// if(StringUtils.isEmpty(ip) && ip.length() > 15) {
|
if(!StringUtils.isEmpty(ip) && ip.length() > 15 && ip.contains(",")) {
|
||||||
// if(ip.indexOf(",") > 0) {
|
ip = ip.substring(0, ip.indexOf(","));
|
||||||
// ip = ip.substring(0, ip.indexOf(","));
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
return ip;
|
return ip;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user