fix:中断外层循环

上级 78c64a01
......@@ -21,7 +21,7 @@ import java.util.List;
*/
public class FileContainsUtil {
/**
* 默认不存在
* 默认图片不存在
*/
private static boolean IS_EXIST = false;
/**
......@@ -37,9 +37,9 @@ public class FileContainsUtil {
*/
private static final String BLOG_FOLDER2 = "/Users/qinyingjie/Documents/idea-workspace/study/blog/";
/**
* 白名单
* 图片白名单
*/
private static final List<String> WHITELISTS = Arrays.asList(
private static final List<String> PIC_PATH_WHITELISTS = Arrays.asList(
"http://qinyingjie.top/blogImg/image-20230324112725149.png"
, "http://qinyingjie.top/blogImg/logo.png"
, "http://qinyingjie.top/blogImg/image-20230601124308164.png"
......@@ -54,10 +54,14 @@ public class FileContainsUtil {
final List<String> picNames = getPicName(PIC_PATH);
System.out.println("图片总数为" + picNames.size());
if (CollectionUtil.isNotEmpty(picNames)) {
for (String picName : picNames) {
outerloop:
for (int i = 0; i < picNames.size(); i++) {
String picName = picNames.get(i);
//是白名单里面的图片,直接忽略
if (WHITELISTS.contains(picName)) {
continue;
for (String picPathWhitelist : PIC_PATH_WHITELISTS) {
if (picPathWhitelist.contains(picName)) {
continue outerloop;
}
}
//默认不存在
IS_EXIST = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册