archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1040919 - in /archiva/trunk/archiva-modules: archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/ archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/ plugins/generic-metadata-su...
Date Wed, 01 Dec 2010 09:48:33 GMT
Author: brett
Date: Wed Dec  1 09:48:32 2010
New Revision: 1040919

URL: http://svn.apache.org/viewvc?rev=1040919&view=rev
Log:
[MRM-1436] better Map handling
Submitted by: Dave Brosius

Modified:
    archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
    archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java
    archiva/trunk/archiva-modules/plugins/generic-metadata-support/src/main/java/org/apache/archiva/metadata/generic/GenericMetadataFacet.java

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java?rev=1040919&r1=1040918&r2=1040919&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
Wed Dec  1 09:48:32 2010
@@ -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()
);
 

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java?rev=1040919&r1=1040918&r2=1040919&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java
Wed Dec  1 09:48:32 2010
@@ -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;
                 }
             }            

Modified: archiva/trunk/archiva-modules/plugins/generic-metadata-support/src/main/java/org/apache/archiva/metadata/generic/GenericMetadataFacet.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/plugins/generic-metadata-support/src/main/java/org/apache/archiva/metadata/generic/GenericMetadataFacet.java?rev=1040919&r1=1040918&r2=1040919&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/plugins/generic-metadata-support/src/main/java/org/apache/archiva/metadata/generic/GenericMetadataFacet.java
(original)
+++ archiva/trunk/archiva-modules/plugins/generic-metadata-support/src/main/java/org/apache/archiva/metadata/generic/GenericMetadataFacet.java
Wed Dec  1 09:48:32 2010
@@ -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()



Mime
View raw message