From 6be0ea2b06da01e86517d700768c5261e132f0e0 Mon Sep 17 00:00:00 2001 From: j502647092 Date: Sat, 10 Oct 2015 20:37:33 +0800 Subject: [PATCH] check repo null while update repo... Signed-off-by: j502647092 --- src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {