【fix sonar】CommonUtils文件

This commit is contained in:
梁琦涛
2023-03-08 15:45:16 +08:00
parent 19c5eff30c
commit 700d3001cf
@@ -97,10 +97,7 @@ public class CommonUtils {
return false;
}else{
Matcher m = ZHONGWEN_PATTERN.matcher(str);
if (m.find()) {
return true;
}
return false;
return m.find();
}
}
@@ -256,8 +253,7 @@ public class CommonUtils {
*/
public static boolean limitFileSuffix(String fileName,String[] fileSuffixLimits){
final List<String> fileNameList = Arrays.asList(fileSuffixLimits);
boolean isExists = fileNameList.stream().anyMatch(name -> fileName.substring(0,fileName.lastIndexOf('.')).contains(name)||fileName.substring(fileName.lastIndexOf('.')).equals(name));
return isExists;
return fileNameList.stream().anyMatch(name -> fileName.substring(0,fileName.lastIndexOf('.')).contains(name)||fileName.substring(fileName.lastIndexOf('.')).equals(name));
}
/**
* RSA 使用私钥解密