【fix sonar】CommonUtils文件
This commit is contained in:
+2
-6
@@ -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 使用私钥解密
|
||||
|
||||
Reference in New Issue
Block a user