mirror of https://github.com/apache/archiva.git
[MRM-1871] copy List before sorting it
This commit is contained in:
parent
0148a725c7
commit
c5e2567516
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue