diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java index 0daa2d201..11eda06f3 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java @@ -134,7 +134,7 @@ public class DefaultRepositoryProxyConnectors @Inject private UrlFailureCache urlFailureCache; - private Map> proxyConnectorMap = new HashMap<>(); + private Map> proxyConnectorMap = new ConcurrentHashMap<>(); private Map networkProxyMap = new ConcurrentHashMap<>(); @@ -457,7 +457,7 @@ public class DefaultRepositoryProxyConnectors boolean metadataNeedsUpdating = false; long originalTimestamp = getLastModified( localFile ); - List connectors = getProxyConnectors( repository ); + List connectors = new ArrayList<>( getProxyConnectors( repository ) ); for ( ProxyConnector connector : connectors ) { if ( connector.isDisabled() )