mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-06-10 23:47:29 +00:00
fix(FjTool): 修复 parseById 中 get("paramJson") 可能导致的 NPE
当 otherParam 中缺少 "paramJson" 键时,后续 getString 调用会抛出 NPE。 添加 null 检查并提前返回失败。
This commit is contained in:
@@ -581,6 +581,10 @@ public class FjTool extends PanBase {
|
||||
|
||||
// 第二次请求
|
||||
JsonObject paramJson = (JsonObject)shareLinkInfo.getOtherParam().get("paramJson");
|
||||
if (paramJson == null) {
|
||||
promise.fail("缺少 paramJson 参数");
|
||||
return promise.future();
|
||||
}
|
||||
clientNoRedirects.getAbs(UriTemplate.of(SECOND_REQUEST_URL_VIP))
|
||||
.setTemplateParam("fidEncode", paramJson.getString("fidEncode"))
|
||||
.setTemplateParam("uuid", paramJson.getString("uuid"))
|
||||
|
||||
Reference in New Issue
Block a user