mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-06-10 15:37:28 +00:00
fix: LocalConstant 改用 ConcurrentHashMap 保证线程安全,LzTool 方法名拼写修正
- LocalConstant: HashMap → ConcurrentHashMap,put() 改用 putIfAbsent 消除 check-then-act 竞态 - LzTool: 私有方法 setDateAndComplate → setDateAndComplete(拼写修正,仅内部调用)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user