fix: LocalConstant 改用 ConcurrentHashMap 保证线程安全,LzTool 方法名拼写修正

- LocalConstant: HashMap → ConcurrentHashMap,put() 改用 putIfAbsent 消除 check-then-act 竞态
- LzTool: 私有方法 setDateAndComplate → setDateAndComplete(拼写修正,仅内部调用)
This commit is contained in:
yukaidi
2026-05-29 03:14:10 +08:00
parent aa30571709
commit 07a330cfd4
2 changed files with 6 additions and 7 deletions

View File

@@ -290,12 +290,12 @@ public class LzTool extends PanBase {
if (location0 == null) {
fail(downUrl + " -> 直链获取失败2, 可能分享已失效");
} else {
setDateAndComplate(location0);
setDateAndComplete(location0);
}
}).onFailure(handleFail(downUrl));
return;
}
setDateAndComplate(location);
setDateAndComplete(location);
})
.onFailure(handleFail(downUrl));
} catch (Exception e) {
@@ -304,7 +304,7 @@ public class LzTool extends PanBase {
}).onFailure(handleFail(url));
}
private void setDateAndComplate(String location0) {
private void setDateAndComplete(String location0) {
// 分享时间 提取url中的时间戳格式lanzoui.com/abc/abc/yyyy/mm/dd/
String regex = "(\\d{4}/\\d{1,2}/\\d{1,2})";
Matcher matcher = Pattern.compile(regex).matcher(location0);