aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-11-27 10:57:27 +1100
committerOlivier Lamy <olamy@apache.org>2014-11-27 10:57:27 +1100
commitc5e256751603e7893a845f2c094bcc1d5461fc55 (patch)
treee6680e5eea93e4ff1f2d3f006efdf0e9198c4b03 /archiva-modules
parent0148a725c711cd4040f141eba3d476648089318a (diff)
downloadarchiva-c5e256751603e7893a845f2c094bcc1d5461fc55.tar.gz
archiva-c5e256751603e7893a845f2c094bcc1d5461fc55.zip
[MRM-1871] copy List before sorting it
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java6
1 files changed, 3 insertions, 3 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 2095b6bd7..ad73be6a9 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
@@ -1255,14 +1255,14 @@ public class DefaultRepositoryProxyConnectors
public List<ProxyConnector> getProxyConnectors( ManagedRepositoryContent repository )
{
- List<ProxyConnector> ret = this.proxyConnectorMap.get( repository.getId() );
- if ( ret == null )
+ if ( !this.proxyConnectorMap.containsKey( repository.getId() ) )
{
return Collections.emptyList();
}
+ List<ProxyConnector> ret = new ArrayList<>( this.proxyConnectorMap.get( repository.getId() ) );
Collections.sort( ret, ProxyConnectorOrderComparator.getInstance() );
- return new ArrayList<>( ret );
+ return ret;
}