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