]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1025] avoid concurrent access exceptions
authorBrett Porter <brett@apache.org>
Tue, 19 Jan 2010 15:49:53 +0000 (15:49 +0000)
committerBrett Porter <brett@apache.org>
Tue, 19 Jan 2010 15:49:53 +0000 (15:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@900825 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/plugins/metadata-repository-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java

index 1211c2c9d8cf2949484094f92e5a4d3b60ba9832..a6ec061ba21bd24004c9d8b1c4039304cf141dc8 100644 (file)
@@ -120,7 +120,7 @@ public class FileMetadataRepository
 
         Properties properties = readOrCreateProperties( directory, PROJECT_VERSION_METADATA_KEY );
         // remove properties that are not references or artifacts
-        for ( Object key : properties.keySet() )
+        for ( Object key : new ArrayList( properties.keySet() ) )
         {
             String name = (String) key;
             if ( !name.contains( ":" ) && !name.equals( "facetIds" ) )
@@ -296,7 +296,7 @@ public class FileMetadataRepository
         {
             metadataFacet = metadataFacetFactory.createMetadataFacet( repositoryId, name );
             Map<String, String> map = new HashMap<String, String>();
-            for ( Object key : properties.keySet() )
+            for ( Object key : new ArrayList( properties.keySet() ) )
             {
                 String property = (String) key;
                 map.put( property, properties.getProperty( property ) );
@@ -784,7 +784,7 @@ public class FileMetadataRepository
                     {
                         MetadataFacet facet = factory.createMetadataFacet();
                         Map<String, String> map = new HashMap<String, String>();
-                        for ( Object key : properties.keySet() )
+                        for ( Object key : new ArrayList( properties.keySet() ) )
                         {
                             String property = (String) key;
                             if ( property.startsWith( facet.getFacetId() ) )