[MNG-4432] reimplement parallel artifacts download

Prevent possible ConcurrentModificationException

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@901149 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2010-01-20 11:54:02 +00:00
parent 9417640359
commit 3264611447
1 changed files with 2 additions and 4 deletions

View File

@ -20,9 +20,8 @@ package org.apache.maven.cli;
*/ */
import java.io.PrintStream; import java.io.PrintStream;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.maven.repository.ArtifactTransferEvent; import org.apache.maven.repository.ArtifactTransferEvent;
import org.apache.maven.repository.ArtifactTransferResource; import org.apache.maven.repository.ArtifactTransferResource;
@ -36,8 +35,7 @@ class ConsoleMavenTransferListener
extends AbstractMavenTransferListener extends AbstractMavenTransferListener
{ {
private Map<ArtifactTransferResource, Long> downloads = private Map<ArtifactTransferResource, Long> downloads = new ConcurrentHashMap<ArtifactTransferResource, Long>();
Collections.synchronizedMap( new LinkedHashMap<ArtifactTransferResource, Long>() );
private int lastLength; private int lastLength;