diff --git a/pom.xml b/pom.xml
index febe935..b92a99a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,7 @@
http://ci.citycraft.cn:8080
- 修复更新仓库时产生的NPE错误...
+ 修复一个更新源数据时发现的迭代错误...
UTF-8
diff --git a/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java b/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java
index 517fc12..52d1d7c 100644
--- a/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java
+++ b/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java
@@ -220,7 +220,8 @@ public class RepositoryManager {
if (updateRepositories(sender, string)) {
sender.sendMessage("§6源: §e" + string + " §a更新成功!");
} else {
- sender.sendMessage("§6源: §e" + string + " §c更新失败!");
+ sender.sendMessage("§6源: §e" + string + " §c未找到任何仓库信息 已删除!");
+ keys.remove();
}
}
return true;
@@ -232,13 +233,11 @@ public class RepositoryManager {
}
final String json = getHtml(urlstring);
if (json == null || json.isEmpty()) {
- sender.sendMessage("§6源: §e" + urlstring + " §c未找到任何仓库信息 已删除!");
- repos.remove(urlstring);
return false;
}
final List lrepo = jsonToRepositories(json);
if (lrepo == null || lrepo.isEmpty()) {
- return false;
+ return true;
}
for (final Repository repository : lrepo) {
addPackage(sender, repository.url);