diff options
author | Olivier Lamy <olamy@apache.org> | 2014-11-23 23:02:06 +1100 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-11-23 23:02:06 +1100 |
commit | 480825d72b98d707b958ec53eb56cf6b1c6b2299 (patch) | |
tree | 5355120029cccb7cac1dffdcd73950e1d5c28269 /archiva-modules/archiva-base | |
parent | 5d29c9ff1d5985db1a8b293ae7a4fb29452041f7 (diff) | |
download | archiva-480825d72b98d707b958ec53eb56cf6b1c6b2299.tar.gz archiva-480825d72b98d707b958ec53eb56cf6b1c6b2299.zip |
copy collections to avoid ConcurrentModificationException
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r-- | archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java | 4 |
1 files changed, 2 insertions, 2 deletions
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<String, List<ProxyConnector>> proxyConnectorMap = new HashMap<>(); + private Map<String, List<ProxyConnector>> proxyConnectorMap = new ConcurrentHashMap<>(); private Map<String, ProxyInfo> networkProxyMap = new ConcurrentHashMap<>(); @@ -457,7 +457,7 @@ public class DefaultRepositoryProxyConnectors boolean metadataNeedsUpdating = false; long originalTimestamp = getLastModified( localFile ); - List<ProxyConnector> connectors = getProxyConnectors( repository ); + List<ProxyConnector> connectors = new ArrayList<>( getProxyConnectors( repository ) ); for ( ProxyConnector connector : connectors ) { if ( connector.isDisabled() ) |