diff --git a/src/main/java/cn/nzcer/odapi/cron/SyncDataBase.java b/src/main/java/cn/nzcer/odapi/cron/SyncDataBase.java index 520b3e6..636eeee 100644 --- a/src/main/java/cn/nzcer/odapi/cron/SyncDataBase.java +++ b/src/main/java/cn/nzcer/odapi/cron/SyncDataBase.java @@ -117,7 +117,13 @@ public Set parseRepo(String url) throws IOException { public Set parseRepo(String url, int count) throws IOException { JSONObject jsonObject = NetUtil.doGet(url); Set repoNames = new HashSet<>(); - JSONArray jsonArray = jsonObject.getJSONArray("data"); + JSONArray jsonArray = null; + try { + jsonArray = jsonObject.getJSONArray("data"); + } catch (Exception e) { + e.printStackTrace(); + return repoNames; + } int cnt = 0; for (int i = 0; i < jsonArray.size(); i++) { String repoName = jsonArray.getJSONObject(i).getJSONObject("item").getString("name");