mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-06-10 15:37:28 +00:00
fix: 修复 CommonUtils.getURLParams() 中 fullUrl.getQuery() 返回 null 时的 NPE
This commit is contained in:
@@ -33,6 +33,9 @@ public class CommonUtils {
|
||||
public static Map<String, String> getURLParams(String url) throws MalformedURLException {
|
||||
URL fullUrl = new URL(url);
|
||||
String query = fullUrl.getQuery();
|
||||
if (query == null || query.isEmpty()) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
String[] params = query.split("&");
|
||||
Map<String, String> map = new HashMap<>();
|
||||
for (String param : params) {
|
||||
|
||||
Reference in New Issue
Block a user