mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-11-22 14:28:46 +00:00
修复一个更新源数据时发现的迭代错误...
This commit is contained in:
parent
d755b700d1
commit
1d29be976d
2
pom.xml
2
pom.xml
@ -55,7 +55,7 @@
|
||||
</build>
|
||||
<properties>
|
||||
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
|
||||
<update.description>修复更新仓库时产生的NPE错误...</update.description>
|
||||
<update.description>修复一个更新源数据时发现的迭代错误...</update.description>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<repositories>
|
||||
|
@ -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<Repository> lrepo = jsonToRepositories(json);
|
||||
if (lrepo == null || lrepo.isEmpty()) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
for (final Repository repository : lrepo) {
|
||||
addPackage(sender, repository.url);
|
||||
|
Loading…
Reference in New Issue
Block a user