diff options
author | Brett Porter <brett@apache.org> | 2010-01-19 10:41:19 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2010-01-19 10:41:19 +0000 |
commit | 9a1c82e9af392b51e265c0a285e0a3ee8304dff2 (patch) | |
tree | c91c816601a2336b69abcb5538fddd5a1721b893 /archiva-modules/plugins | |
parent | 9c28117ca334e17256a93138631cc84dddd56e12 (diff) | |
download | archiva-9a1c82e9af392b51e265c0a285e0a3ee8304dff2.tar.gz archiva-9a1c82e9af392b51e265c0a285e0a3ee8304dff2.zip |
[MRM-1025] remove Java 1.6 methods
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@900720 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 | 15 |
1 files changed, 9 insertions, 6 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 195c11b44..1211c2c9d 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,8 +120,9 @@ public class FileMetadataRepository Properties properties = readOrCreateProperties( directory, PROJECT_VERSION_METADATA_KEY ); // remove properties that are not references or artifacts - for ( String name : properties.stringPropertyNames() ) + for ( Object key : properties.keySet() ) { + String name = (String) key; if ( !name.contains( ":" ) && !name.equals( "facetIds" ) ) { properties.remove( name ); @@ -295,9 +296,10 @@ public class FileMetadataRepository { metadataFacet = metadataFacetFactory.createMetadataFacet( repositoryId, name ); Map<String, String> map = new HashMap<String, String>(); - for ( String key : properties.stringPropertyNames() ) + for ( Object key : properties.keySet() ) { - map.put( key, properties.getProperty( key ) ); + String property = (String) key; + map.put( property, properties.getProperty( property ) ); } metadataFacet.fromProperties( map ); } @@ -782,11 +784,12 @@ public class FileMetadataRepository { MetadataFacet facet = factory.createMetadataFacet(); Map<String, String> map = new HashMap<String, String>(); - for ( String key : properties.stringPropertyNames() ) + for ( Object key : properties.keySet() ) { - if ( key.startsWith( facet.getFacetId() ) ) + String property = (String) key; + if ( property.startsWith( facet.getFacetId() ) ) { - map.put( key, properties.getProperty( key ) ); + map.put( property, properties.getProperty( property ) ); } } facet.fromProperties( map ); |