[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
This commit is contained in:
Brett Porter 2010-01-19 10:41:19 +00:00
parent 9c28117ca3
commit 9a1c82e9af
1 changed files with 9 additions and 6 deletions

View File

@ -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 );