mirror of
https://github.com/apache/archiva.git
synced 2025-02-08 02:59:43 +00:00
[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:
parent
0570662adb
commit
deba382d42
@ -315,9 +315,8 @@ else if ( "checksum".equals( policyId ) )
|
|||||||
Map<String, java.util.List<ProxyConnectorConfiguration>> proxyConnectorMap = config
|
Map<String, java.util.List<ProxyConnectorConfiguration>> proxyConnectorMap = config
|
||||||
.getProxyConnectorAsMap();
|
.getProxyConnectorAsMap();
|
||||||
|
|
||||||
for ( String key : proxyConnectorMap.keySet() )
|
for ( List<ProxyConnectorConfiguration> connectors : proxyConnectorMap.values() )
|
||||||
{
|
{
|
||||||
List<ProxyConnectorConfiguration> connectors = proxyConnectorMap.get( key );
|
|
||||||
// Sort connectors by order field.
|
// Sort connectors by order field.
|
||||||
Collections.sort( connectors, ProxyConnectorConfigurationOrderComparator.getInstance() );
|
Collections.sort( connectors, ProxyConnectorConfigurationOrderComparator.getInstance() );
|
||||||
|
|
||||||
|
@ -166,17 +166,17 @@ private SearchResults search( SearchResultLimits limits, BooleanQuery q )
|
|||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
Map<String, IndexingContext> indexingContexts = indexer.getIndexingContexts();
|
Map<String, IndexingContext> indexingContexts = indexer.getIndexingContexts();
|
||||||
Set<String> keys = indexingContexts.keySet();
|
|
||||||
for( String key : keys )
|
for ( Map.Entry<String, IndexingContext> entry : indexingContexts.entrySet() )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
indexer.removeIndexingContext( indexingContexts.get( key ), false );
|
indexer.removeIndexingContext( entry.getValue(), false );
|
||||||
log.debug( "Indexing context '" + key + "' removed from search." );
|
log.debug( "Indexing context '" + entry.getKey() + "' removed from search." );
|
||||||
}
|
}
|
||||||
catch ( IOException e )
|
catch ( IOException e )
|
||||||
{
|
{
|
||||||
log.warn( "IOException occurred while removing indexing content '" + key + "'." );
|
log.warn( "IOException occurred while removing indexing content '" + entry.getKey() + "'." );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,10 +48,7 @@ public void fromProperties( Map<String, String> properties )
|
|||||||
additionalProperties = new TreeMap<String, String>();
|
additionalProperties = new TreeMap<String, String>();
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( String key : properties.keySet() )
|
additionalProperties.putAll( properties );
|
||||||
{
|
|
||||||
additionalProperties.put( key, properties.get( key ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> toProperties()
|
public Map<String, String> toProperties()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user