[MRM-1436] better Map handling

Submitted by: Dave Brosius


git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1040919 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2010-12-01 09:48:32 +00:00
parent 0570662adb
commit deba382d42
3 changed files with 7 additions and 11 deletions

View File

@ -315,9 +315,8 @@ public class DefaultArchivaConfiguration
Map<String, java.util.List<ProxyConnectorConfiguration>> proxyConnectorMap = config
.getProxyConnectorAsMap();
for ( String key : proxyConnectorMap.keySet() )
for ( List<ProxyConnectorConfiguration> connectors : proxyConnectorMap.values() )
{
List<ProxyConnectorConfiguration> connectors = proxyConnectorMap.get( key );
// Sort connectors by order field.
Collections.sort( connectors, ProxyConnectorConfigurationOrderComparator.getInstance() );

View File

@ -166,17 +166,17 @@ public class NexusRepositorySearch
finally
{
Map<String, IndexingContext> indexingContexts = indexer.getIndexingContexts();
Set<String> keys = indexingContexts.keySet();
for( String key : keys )
for ( Map.Entry<String, IndexingContext> entry : indexingContexts.entrySet() )
{
try
{
indexer.removeIndexingContext( indexingContexts.get( key ), false );
log.debug( "Indexing context '" + key + "' removed from search." );
indexer.removeIndexingContext( entry.getValue(), false );
log.debug( "Indexing context '" + entry.getKey() + "' removed from search." );
}
catch ( IOException e )
{
log.warn( "IOException occurred while removing indexing content '" + key + "'." );
log.warn( "IOException occurred while removing indexing content '" + entry.getKey() + "'." );
continue;
}
}

View File

@ -48,10 +48,7 @@ public class GenericMetadataFacet
additionalProperties = new TreeMap<String, String>();
}
for ( String key : properties.keySet() )
{
additionalProperties.put( key, properties.get( key ) );
}
additionalProperties.putAll( properties );
}
public Map<String, String> toProperties()