mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 20:12:14 +00:00
Replace loop with Collection#removeIf where possible
This commit is contained in:
1 parent
4284c3d2ab
commit
3764940c2d
2 files changed
+2
-8
No files matched your search
@@ -1726,10 +1726,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
hudson.checkPermission(Jenkins.ADMINISTER);
|
||||
UpdateCenter uc = hudson.getUpdateCenter();
|
||||
PersistedList<UpdateSite> sites = uc.getSites();
|
||||
for (UpdateSite s : sites) {
|
||||
if (s.getId().equals(UpdateCenter.ID_DEFAULT))
|
||||
sites.remove(s);
|
||||
}
|
||||
sites.removeIf(s -> s.getId().equals(UpdateCenter.ID_DEFAULT));
|
||||
sites.add(new UpdateSite(UpdateCenter.ID_DEFAULT, site));
|
||||
|
||||
return new HttpRedirect("advanced");
|
||||
|
||||
Reference in new issue
Block a user