aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2019-05-25 10:25:39 +0200
committerMartin Stockhammer <martin_s@apache.org>2019-05-25 10:25:39 +0200
commitebd149e6b3e58c2fb769f4fc70161addd12c958c (patch)
tree010e9525f1b5a669e59d14c5d25f6e2323890af4 /archiva-modules
parent3b1d213a5b77e381dbf144ee36750043e4ae9281 (diff)
downloadarchiva-ebd149e6b3e58c2fb769f4fc70161addd12c958c.tar.gz
archiva-ebd149e6b3e58c2fb769f4fc70161addd12c958c.zip
Fixing error for setting repository list
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepositoryGroup.java6
1 files changed, 4 insertions, 2 deletions
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<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();
}