【fix sonar】CommonUtils文件
This commit is contained in:
+2
-6
@@ -97,10 +97,7 @@ public class CommonUtils {
|
|||||||
return false;
|
return false;
|
||||||
}else{
|
}else{
|
||||||
Matcher m = ZHONGWEN_PATTERN.matcher(str);
|
Matcher m = ZHONGWEN_PATTERN.matcher(str);
|
||||||
if (m.find()) {
|
return m.find();
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,8 +253,7 @@ public class CommonUtils {
|
|||||||
*/
|
*/
|
||||||
public static boolean limitFileSuffix(String fileName,String[] fileSuffixLimits){
|
public static boolean limitFileSuffix(String fileName,String[] fileSuffixLimits){
|
||||||
final List<String> fileNameList = Arrays.asList(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 fileNameList.stream().anyMatch(name -> fileName.substring(0,fileName.lastIndexOf('.')).contains(name)||fileName.substring(fileName.lastIndexOf('.')).equals(name));
|
||||||
return isExists;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* RSA 使用私钥解密
|
* RSA 使用私钥解密
|
||||||
|
|||||||
Reference in New Issue
Block a user