diff --git a/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java b/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java index 6aed95d..19fd1d8 100644 --- a/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java +++ b/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java @@ -203,11 +203,11 @@ public class RepositoryManager { urlstring = urlstring + "/repo.info"; } final String json = getHtml(urlstring); - if (json.isEmpty()) { + if (json == null || json.isEmpty()) { return false; } final List lrepo = jsonToRepositories(json); - if (lrepo.isEmpty()) { + if (lrepo == null || lrepo.isEmpty()) { return false; } for (final Repository repository : lrepo) {