From: Martin Stockhammer Date: Sat, 25 May 2019 08:25:39 +0000 (+0200) Subject: Fixing error for setting repository list X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ebd149e6b3e58c2fb769f4fc70161addd12c958c;p=archiva.git Fixing error for setting repository list --- diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepositoryGroup.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepositoryGroup.java index f212b7636..11be643bb 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepositoryGroup.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepositoryGroup.java @@ -80,11 +80,13 @@ public class AbstractRepositoryGroup extends AbstractRepository implements Edita } @Override - public void setRepositories(List repositories) { + public void setRepositories(List newRepositories) { rwl.writeLock().lock(); try { repositories.clear(); - repositories.addAll(repositories); + for(ManagedRepository repo : newRepositories) { + repositories.put(repo.getId(), repo); + } } finally { rwl.writeLock().unlock(); }