在方法isMatchedIp的参数中,当filter为null而ip非null/空时,报filter为null异常。把判断条件由&&改为||解决此bug。

master
wangfeiyu 2023-02-22 08:54:10 +08:00
parent 1ef82d75b1
commit 4b21a3bc48
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ public class IpUtils
*/
public static boolean isMatchedIp(String filter, String ip)
{
if (StringUtils.isEmpty(filter) && StringUtils.isEmpty(ip))
if (StringUtils.isEmpty(filter) || StringUtils.isEmpty(ip))
{
return false;
}