archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject archiva git commit: [MRM-1871] copy List before sorting it
Date Wed, 26 Nov 2014 23:58:07 GMT
Repository: archiva
Updated Branches:
  refs/heads/master 0148a725c -> c5e256751


[MRM-1871] copy List before sorting it


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/c5e25675
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/c5e25675
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/c5e25675

Branch: refs/heads/master
Commit: c5e256751603e7893a845f2c094bcc1d5461fc55
Parents: 0148a72
Author: Olivier Lamy <olamy@apache.org>
Authored: Thu Nov 27 10:57:27 2014 +1100
Committer: Olivier Lamy <olamy@apache.org>
Committed: Thu Nov 27 10:57:27 2014 +1100

----------------------------------------------------------------------
 .../apache/archiva/proxy/DefaultRepositoryProxyConnectors.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/c5e25675/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java
----------------------------------------------------------------------
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 2095b6b..ad73be6 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;
 
     }
 


Mime
View raw message