summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-11-24 11:14:11 +1100
committerOlivier Lamy <olamy@apache.org>2014-11-24 11:14:32 +1100
commit54b22367001d20483c85358d7ca0c1eededbc647 (patch)
tree9b8fc386db8411c8cdfe894ed4c5f850b7a7a3be
parent1f42a01fb0238c1fd7fabcb485bb8adf475f6e2c (diff)
downloadarchiva-54b22367001d20483c85358d7ca0c1eededbc647.tar.gz
archiva-54b22367001d20483c85358d7ca0c1eededbc647.zip
make it clear it is ConcurrentMap so no need of synchronized block
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java22
1 files changed, 11 insertions, 11 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 11eda06f3..686214938 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
@@ -97,6 +97,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
/**
* DefaultRepositoryProxyConnectors
@@ -134,9 +135,9 @@ public class DefaultRepositoryProxyConnectors
@Inject
private UrlFailureCache urlFailureCache;
- private Map<String, List<ProxyConnector>> proxyConnectorMap = new ConcurrentHashMap<>();
+ private ConcurrentMap<String, List<ProxyConnector>> proxyConnectorMap = new ConcurrentHashMap<>();
- private Map<String, ProxyInfo> networkProxyMap = new ConcurrentHashMap<>();
+ private ConcurrentMap<String, ProxyInfo> networkProxyMap = new ConcurrentHashMap<>();
@Inject
private WagonFactory wagonFactory;
@@ -1253,17 +1254,16 @@ public class DefaultRepositoryProxyConnectors
@Override
public List<ProxyConnector> getProxyConnectors( ManagedRepositoryContent repository )
{
- synchronized ( this.proxyConnectorMap )
- {
- List<ProxyConnector> ret = this.proxyConnectorMap.get( repository.getId() );
- if ( ret == null )
- {
- return Collections.emptyList();
- }
- Collections.sort( ret, ProxyConnectorOrderComparator.getInstance() );
- return ret;
+ List<ProxyConnector> ret = this.proxyConnectorMap.get( repository.getId() );
+ if ( ret == null )
+ {
+ return Collections.emptyList();
}
+
+ Collections.sort( ret, ProxyConnectorOrderComparator.getInstance() );
+ return ret;
+
}
@Override