Fixing error for setting repository list
@@ -80,11 +80,13 @@ public void clearRepositories() {
}
@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();
}
