]> source.dussan.org Git - archiva.git/commitdiff
Fixing error for setting repository list
authorMartin Stockhammer <martin_s@apache.org>
Sat, 25 May 2019 08:25:39 +0000 (10:25 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Sat, 25 May 2019 08:25:39 +0000 (10:25 +0200)
archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepositoryGroup.java

index f212b7636d5d1a0e96385c98387ae0ae85adf572..11be643bbf24f9bc842050c3dfd736df71ef0185 100644 (file)
@@ -80,11 +80,13 @@ public class AbstractRepositoryGroup extends AbstractRepository implements Edita
     }
 
     @Override
-    public void setRepositories(List<ManagedRepository> repositories) {
+    public void setRepositories(List<ManagedRepository> newRepositories) {
         rwl.writeLock().lock();
         try {
             repositories.clear();
-            repositories.addAll(repositories);
+            for(ManagedRepository repo : newRepositories) {
+                repositories.put(repo.getId(), repo);
+            }
         } finally {
             rwl.writeLock().unlock();
         }