diff options
author | Brett Porter <brett@apache.org> | 2010-01-19 15:49:53 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2010-01-19 15:49:53 +0000 |
commit | d0b2a20903c26ae784f46a4b9f3b10f2049c8242 (patch) | |
tree | 9aeb341892fa41448b93e7c21d9e0eb87697bc10 /archiva-modules/plugins | |
parent | 93f9e26408d1fb72a22e31cb19640cdca2de2e9f (diff) | |
download | archiva-d0b2a20903c26ae784f46a4b9f3b10f2049c8242.tar.gz archiva-d0b2a20903c26ae784f46a4b9f3b10f2049c8242.zip |
[MRM-1025] avoid concurrent access exceptions
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@900825 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins')
-rw-r--r-- | archiva-modules/plugins/metadata-repository-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/archiva-modules/plugins/metadata-repository-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java b/archiva-modules/plugins/metadata-repository-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java index 1211c2c9d..a6ec061ba 100644 --- a/archiva-modules/plugins/metadata-repository-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java +++ b/archiva-modules/plugins/metadata-repository-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java @@ -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() ) ) |