diff options
author | Olivier Lamy <olamy@apache.org> | 2014-04-10 23:11:38 +1000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-04-10 23:11:38 +1000 |
commit | d6c28781b0b0f9de8142c8b96b810ab6c415cb26 (patch) | |
tree | 99e10f3e0058db84f706d5dc5998a64e75357e98 /archiva-modules/archiva-base/archiva-repository-admin | |
parent | b244153061054a1efd45e2d07d69b751070660f2 (diff) | |
download | archiva-d6c28781b0b0f9de8142c8b96b810ab6c415cb26.tar.gz archiva-d6c28781b0b0f9de8142c8b96b810ab6c415cb26.zip |
more diamond
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-admin')
10 files changed, 24 insertions, 26 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/AbstractRepositoryConnector.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/AbstractRepositoryConnector.java index 4e55a7cd5..89c180e6f 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/AbstractRepositoryConnector.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/AbstractRepositoryConnector.java @@ -157,7 +157,7 @@ public abstract class AbstractRepositoryConnector { if ( this.policies == null ) { - this.policies = new HashMap<String, String>(); + this.policies = new HashMap<>(); } return this.policies; @@ -172,7 +172,7 @@ public abstract class AbstractRepositoryConnector { if ( this.properties == null ) { - this.properties = new HashMap<String, String>(); + this.properties = new HashMap<>(); } return this.properties; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/LdapConfiguration.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/LdapConfiguration.java index bc8c721b8..707d22dcf 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/LdapConfiguration.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/LdapConfiguration.java @@ -93,7 +93,7 @@ public class LdapConfiguration /** * Field extraProperties. */ - private Map<String, String> extraProperties = new HashMap<String, String>(); + private Map<String, String> extraProperties = new HashMap<>(); /** * field to ease json mapping wrapper on <code>extraProperties</code> field diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java index dda660af1..7a58dd25d 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java @@ -111,7 +111,7 @@ public class RedbackRuntimeConfiguration { if ( this.configurationProperties == null ) { - this.configurationProperties = new HashMap<String, String>(); + this.configurationProperties = new HashMap<>(); } return configurationProperties; } @@ -137,7 +137,7 @@ public class RedbackRuntimeConfiguration this.configurationPropertiesEntries = configurationPropertiesEntries; if ( configurationPropertiesEntries != null ) { - this.configurationProperties = new HashMap<String, String>( configurationPropertiesEntries.size() ); + this.configurationProperties = new HashMap<>( configurationPropertiesEntries.size() ); for ( PropertyEntry propertyEntry : configurationPropertiesEntries ) { this.configurationProperties.put( propertyEntry.getKey(), propertyEntry.getValue() ); diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RemoteRepository.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RemoteRepository.java index 3adbf760d..db8021d86 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RemoteRepository.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RemoteRepository.java @@ -232,7 +232,7 @@ public class RemoteRepository { if ( this.extraParameters == null ) { - this.extraParameters = new HashMap<String, String>(); + this.extraParameters = new HashMap<>(); } return extraParameters; } @@ -275,7 +275,7 @@ public class RemoteRepository { if ( this.extraHeaders == null ) { - this.extraHeaders = new HashMap<String, String>(); + this.extraHeaders = new HashMap<>(); } return extraHeaders; } diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/FiletypeToMapClosure.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/FiletypeToMapClosure.java index 0e4161718..666a8a178 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/FiletypeToMapClosure.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/FiletypeToMapClosure.java @@ -33,7 +33,7 @@ import java.util.Map; public class FiletypeToMapClosure implements Closure { - private Map<String, FileType> map = new HashMap<String, FileType>(); + private Map<String, FileType> map = new HashMap<>(); public void execute( Object input ) { diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java index 91a5f8668..5be2e8fe4 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java @@ -265,7 +265,7 @@ public class DefaultRepositoryGroupAdmin throws RepositoryAdminException { List<RepositoryGroup> repositoriesGroups = getRepositoriesGroups(); - Map<String, RepositoryGroup> map = new HashMap<String, RepositoryGroup>( repositoriesGroups.size() ); + Map<String, RepositoryGroup> map = new HashMap<>( repositoriesGroups.size() ); for ( RepositoryGroup repositoryGroup : repositoriesGroups ) { map.put( repositoryGroup.getId(), repositoryGroup ); @@ -277,7 +277,7 @@ public class DefaultRepositoryGroupAdmin throws RepositoryAdminException { - java.util.Map<String, java.util.List<String>> map = new java.util.HashMap<String, java.util.List<String>>(); + Map<String, List<String>> map = new HashMap<>(); for ( ManagedRepository repo : getManagedRepositoryAdmin().getManagedRepositories() ) { @@ -286,7 +286,7 @@ public class DefaultRepositoryGroupAdmin if ( !group.getRepositories().contains( repo.getId() ) ) { String groupId = group.getId(); - java.util.List<String> repos = map.get( groupId ); + List<String> repos = map.get( groupId ); if ( repos == null ) { repos = new ArrayList<>(); @@ -302,13 +302,13 @@ public class DefaultRepositoryGroupAdmin public Map<String, List<String>> getRepositoryToGroupMap() throws RepositoryAdminException { - java.util.Map<String, java.util.List<String>> map = new java.util.HashMap<String, java.util.List<String>>(); + Map<String, List<String>> map = new HashMap<>(); for ( RepositoryGroup group : getRepositoriesGroups() ) { for ( String repositoryId : group.getRepositories() ) { - java.util.List<String> groups = map.get( repositoryId ); + List<String> groups = map.get( repositoryId ); if ( groups == null ) { groups = new ArrayList<>(); diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java index 5931eb12c..891b83150 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java @@ -72,7 +72,7 @@ import java.util.Map; * * @author Olivier Lamy */ -@Service( "managedRepositoryAdmin#default" ) +@Service("managedRepositoryAdmin#default") public class DefaultManagedRepositoryAdmin extends AbstractRepositoryAdmin implements ManagedRepositoryAdmin @@ -83,7 +83,7 @@ public class DefaultManagedRepositoryAdmin public static final String STAGE_REPO_ID_END = "-stage"; @Inject - @Named( value = "archivaTaskScheduler#repository" ) + @Named(value = "archivaTaskScheduler#repository") private RepositoryArchivaTaskScheduler repositoryTaskScheduler; /** @@ -105,7 +105,7 @@ public class DefaultManagedRepositoryAdmin protected RoleManager roleManager; @Inject - @Named( value = "cache#namespaces" ) + @Named(value = "cache#namespaces") private Cache<String, Collection<String>> namespacesCache; // fields @@ -191,8 +191,7 @@ public class DefaultManagedRepositoryAdmin throws RepositoryAdminException { List<ManagedRepository> managedRepositories = getManagedRepositories(); - Map<String, ManagedRepository> repositoriesMap = - new HashMap<String, ManagedRepository>( managedRepositories.size() ); + Map<String, ManagedRepository> repositoriesMap = new HashMap<>( managedRepositories.size() ); for ( ManagedRepository managedRepository : managedRepositories ) { repositoriesMap.put( managedRepository.getId(), managedRepository ); @@ -417,8 +416,7 @@ public class DefaultManagedRepositoryAdmin } // olamy: copy list for reading as a unit test in webapp fail with ConcurrentModificationException - List<ProxyConnectorConfiguration> proxyConnectors = - new ArrayList<>( config.getProxyConnectors() ); + List<ProxyConnectorConfiguration> proxyConnectors = new ArrayList<>( config.getProxyConnectors() ); for ( ProxyConnectorConfiguration proxyConnector : proxyConnectors ) { if ( StringUtils.equals( proxyConnector.getSourceRepoId(), repository.getId() ) ) diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java index 22fc10bfa..0d9914b0c 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java @@ -166,7 +166,7 @@ public class DefaultProxyConnectorAdmin public Map<String, List<ProxyConnector>> getProxyConnectorAsMap() throws RepositoryAdminException { - Map<String, List<ProxyConnector>> proxyConnectorMap = new HashMap<String, java.util.List<ProxyConnector>>(); + Map<String, List<ProxyConnector>> proxyConnectorMap = new HashMap<>(); Iterator<ProxyConnector> it = getProxyConnectors().iterator(); while ( it.hasNext() ) diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/remote/DefaultRemoteRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/remote/DefaultRemoteRepositoryAdmin.java index c5d17a955..bcf945ad4 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/remote/DefaultRemoteRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/remote/DefaultRemoteRepositoryAdmin.java @@ -65,9 +65,9 @@ public class DefaultRemoteRepositoryAdmin private MavenIndexerUtils mavenIndexerUtils; // fields - List<? extends IndexCreator> indexCreators; + private List<? extends IndexCreator> indexCreators; - NexusIndexer indexer; + private NexusIndexer indexer; @PostConstruct private void initialize() @@ -245,7 +245,7 @@ public class DefaultRemoteRepositoryAdmin public Map<String, RemoteRepository> getRemoteRepositoriesAsMap() throws RepositoryAdminException { - java.util.Map<String, RemoteRepository> map = new HashMap<String, RemoteRepository>(); + java.util.Map<String, RemoteRepository> map = new HashMap<>(); for ( RemoteRepository repo : getRemoteRepositories() ) { diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/AbstractRepositoryAdminTest.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/AbstractRepositoryAdminTest.java index f90c663bf..780ae4ed2 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/AbstractRepositoryAdminTest.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/AbstractRepositoryAdminTest.java @@ -149,10 +149,10 @@ public abstract class AbstractRepositoryAdminTest remoteRepository.setId( id ); remoteRepository.setRemoteDownloadNetworkProxyId( "foo" ); remoteRepository.setDescription( "cool apache repo" ); - Map<String, String> extraParameters = new HashMap<String, String>(); + Map<String, String> extraParameters = new HashMap<>(); extraParameters.put( "foo", "bar" ); remoteRepository.setExtraParameters( extraParameters ); - Map<String, String> extraHeaders = new HashMap<String, String>(); + Map<String, String> extraHeaders = new HashMap<>(); extraHeaders.put( "beer", "wine" ); remoteRepository.setExtraHeaders( extraHeaders ); return remoteRepository; |