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