summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-repository-admin
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-04-10 11:43:11 +1000
committerOlivier Lamy <olamy@apache.org>2014-04-10 11:43:11 +1000
commitd9de8dc7afe4a1e22257a9437d68649eee8f3047 (patch)
tree89e49278beea7304252fd217a35a865986647a44 /archiva-modules/archiva-base/archiva-repository-admin
parentff99d5a203756c31bcf4a8a98ec4c25cb423ad74 (diff)
downloadarchiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.tar.gz
archiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.zip
use diamond operator
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-admin')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/AbstractRepositoryConnector.java8
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/FileType.java2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/LdapConfiguration.java2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ProxyConnectorRule.java2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java4
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RemoteRepository.java4
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RepositoryGroup.java2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java3
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java8
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java6
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java4
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/networkproxy/DefaultNetworkProxyAdmin.java2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java6
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnectorrule/DefaultProxyConnectorRuleAdmin.java10
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/remote/DefaultRemoteRepositoryAdmin.java9
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java14
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockAuditListener.java2
17 files changed, 42 insertions, 46 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 f6afff08c..4e55a7cd5 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
@@ -142,7 +142,7 @@ public abstract class AbstractRepositoryConnector
{
if ( this.blackListPatterns == null )
{
- this.blackListPatterns = new ArrayList<String>( 0 );
+ this.blackListPatterns = new ArrayList<>( 0 );
}
return this.blackListPatterns;
@@ -217,7 +217,7 @@ public abstract class AbstractRepositoryConnector
{
if ( this.whiteListPatterns == null )
{
- this.whiteListPatterns = new ArrayList<String>( 0 );
+ this.whiteListPatterns = new ArrayList<>( 0 );
}
return this.whiteListPatterns;
@@ -365,7 +365,7 @@ public abstract class AbstractRepositoryConnector
public List<PropertyEntry> getPoliciesEntries()
{
- policiesEntries = new ArrayList<PropertyEntry>( getPolicies().size() );
+ policiesEntries = new ArrayList<>( getPolicies().size() );
for ( Map.Entry<String, String> entry : getPolicies().entrySet() )
{
policiesEntries.add( new PropertyEntry( entry.getKey(), entry.getValue() ) );
@@ -383,7 +383,7 @@ public abstract class AbstractRepositoryConnector
public List<PropertyEntry> getPropertiesEntries()
{
- propertiesEntries = new ArrayList<PropertyEntry>( getProperties().size() );
+ propertiesEntries = new ArrayList<>( getProperties().size() );
for ( Map.Entry<String, String> entry : getProperties().entrySet() )
{
propertiesEntries.add( new PropertyEntry( entry.getKey(), entry.getValue() ) );
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/FileType.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/FileType.java
index 7185e75d5..4e25a0d08 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/FileType.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/FileType.java
@@ -66,7 +66,7 @@ public class FileType
{
if ( patterns == null )
{
- this.patterns = new ArrayList<String>( 0 );
+ this.patterns = new ArrayList<>( 0 );
}
return patterns;
}
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 09c7eb5fc..bc8c721b8 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
@@ -212,7 +212,7 @@ public class LdapConfiguration
public List<PropertyEntry> getExtraPropertiesEntries()
{
- extraPropertiesEntries = new ArrayList<PropertyEntry>( getExtraProperties().size() );
+ extraPropertiesEntries = new ArrayList<>( getExtraProperties().size() );
for ( Map.Entry<String, String> entry : getExtraProperties().entrySet() )
{
extraPropertiesEntries.add( new PropertyEntry( entry.getKey(), entry.getValue() ) );
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ProxyConnectorRule.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ProxyConnectorRule.java
index f672bee4d..b4e710195 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ProxyConnectorRule.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ProxyConnectorRule.java
@@ -75,7 +75,7 @@ public class ProxyConnectorRule
{
if ( this.proxyConnectors == null )
{
- this.proxyConnectors = new ArrayList<ProxyConnector>();
+ this.proxyConnectors = new ArrayList<>();
}
return proxyConnectors;
}
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 7e9cf66cb..dda660af1 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
@@ -38,12 +38,12 @@ public class RedbackRuntimeConfiguration
/**
* Field userManagerImpls.
*/
- private List<String> userManagerImpls = new ArrayList<String>();
+ private List<String> userManagerImpls = new ArrayList<>();
/**
* Field rbacManagerImpls.
*/
- private java.util.List<String> rbacManagerImpls = new ArrayList<String>();
+ private java.util.List<String> rbacManagerImpls = new ArrayList<>();
private LdapConfiguration ldapConfiguration;
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 924924bbd..3adbf760d 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
@@ -249,7 +249,7 @@ public class RemoteRepository
public List<PropertyEntry> getExtraParametersEntries()
{
- this.extraParametersEntries = new ArrayList<PropertyEntry>();
+ this.extraParametersEntries = new ArrayList<>();
for ( Map.Entry<String, String> entry : getExtraParameters().entrySet() )
{
this.extraParametersEntries.add( new PropertyEntry( entry.getKey(), entry.getValue() ) );
@@ -292,7 +292,7 @@ public class RemoteRepository
public List<PropertyEntry> getExtraHeadersEntries()
{
- this.extraHeadersEntries = new ArrayList<PropertyEntry>();
+ this.extraHeadersEntries = new ArrayList<>();
for ( Map.Entry<String, String> entry : getExtraHeaders().entrySet() )
{
this.extraHeadersEntries.add( new PropertyEntry( entry.getKey(), entry.getValue() ) );
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RepositoryGroup.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RepositoryGroup.java
index 8a116e158..4f0c3c8c2 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RepositoryGroup.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RepositoryGroup.java
@@ -97,7 +97,7 @@ public class RepositoryGroup
{
if ( this.repositories == null )
{
- this.repositories = new ArrayList<String>( 0 );
+ this.repositories = new ArrayList<>( 0 );
}
return this.repositories;
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java
index ab771b398..3baa42632 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java
@@ -47,8 +47,7 @@ public abstract class AbstractRepositoryAdmin
protected Logger log = LoggerFactory.getLogger( getClass() );
@Inject
- private List<AuditListener> auditListeners = new ArrayList<AuditListener>();
-
+ private List<AuditListener> auditListeners = new ArrayList<>();
@Inject
private RepositoryCommonValidator repositoryCommonValidator;
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java
index 93933ad20..b49a649db 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java
@@ -75,7 +75,7 @@ public class DefaultArchivaAdministration
public List<LegacyArtifactPath> getLegacyArtifactPaths()
throws RepositoryAdminException
{
- List<LegacyArtifactPath> legacyArtifactPaths = new ArrayList<LegacyArtifactPath>(
+ List<LegacyArtifactPath> legacyArtifactPaths = new ArrayList<>(
getArchivaConfiguration().getConfiguration().getLegacyArtifactPaths().size() );
for ( org.apache.archiva.configuration.LegacyArtifactPath legacyArtifactPath : getArchivaConfiguration().getConfiguration().getLegacyArtifactPaths() )
{
@@ -268,7 +268,7 @@ public class DefaultArchivaAdministration
{
return Collections.emptyList();
}
- List<FileType> fileTypes = new ArrayList<FileType>( configFileTypes.size() );
+ List<FileType> fileTypes = new ArrayList<>( configFileTypes.size() );
for ( org.apache.archiva.configuration.FileType fileType : configFileTypes )
{
fileTypes.add( getModelMapper().map( fileType, FileType.class ) );
@@ -279,14 +279,14 @@ public class DefaultArchivaAdministration
public List<String> getKnownContentConsumers()
throws RepositoryAdminException
{
- return new ArrayList<String>(
+ return new ArrayList<>(
getArchivaConfiguration().getConfiguration().getRepositoryScanning().getKnownContentConsumers() );
}
public List<String> getInvalidContentConsumers()
throws RepositoryAdminException
{
- return new ArrayList<String>(
+ return new ArrayList<>(
getArchivaConfiguration().getConfiguration().getRepositoryScanning().getInvalidContentConsumers() );
}
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 425fd5270..91a5f8668 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
@@ -109,7 +109,7 @@ public class DefaultRepositoryGroupAdmin
throws RepositoryAdminException
{
List<RepositoryGroup> repositoriesGroups =
- new ArrayList<RepositoryGroup>( getArchivaConfiguration().getConfiguration().getRepositoryGroups().size() );
+ new ArrayList<>( getArchivaConfiguration().getConfiguration().getRepositoryGroups().size() );
for ( RepositoryGroupConfiguration repositoryGroupConfiguration : getArchivaConfiguration().getConfiguration().getRepositoryGroups() )
{
@@ -289,7 +289,7 @@ public class DefaultRepositoryGroupAdmin
java.util.List<String> repos = map.get( groupId );
if ( repos == null )
{
- repos = new ArrayList<String>();
+ repos = new ArrayList<>();
map.put( groupId, repos );
}
repos.add( repo.getId() );
@@ -311,7 +311,7 @@ public class DefaultRepositoryGroupAdmin
java.util.List<String> groups = map.get( repositoryId );
if ( groups == null )
{
- groups = new ArrayList<String>();
+ groups = new ArrayList<>();
map.put( repositoryId, groups );
}
groups.add( group.getId() );
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 34c89b85f..5931eb12c 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
@@ -418,7 +418,7 @@ public class DefaultManagedRepositoryAdmin
// olamy: copy list for reading as a unit test in webapp fail with ConcurrentModificationException
List<ProxyConnectorConfiguration> proxyConnectors =
- new ArrayList<ProxyConnectorConfiguration>( config.getProxyConnectors() );
+ new ArrayList<>( config.getProxyConnectors() );
for ( ProxyConnectorConfiguration proxyConnector : proxyConnectors )
{
if ( StringUtils.equals( proxyConnector.getSourceRepoId(), repository.getId() ) )
@@ -438,7 +438,7 @@ public class DefaultManagedRepositoryAdmin
// copy to prevent UnsupportedOperationException
RepositoryGroupConfiguration repositoryGroupConfiguration =
config.findRepositoryGroupById( repoGroup );
- List<String> repos = new ArrayList<String>( repositoryGroupConfiguration.getRepositories() );
+ List<String> repos = new ArrayList<>( repositoryGroupConfiguration.getRepositories() );
config.removeRepositoryGroup( repositoryGroupConfiguration );
repos.remove( repository.getId() );
repositoryGroupConfiguration.setRepositories( repos );
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/networkproxy/DefaultNetworkProxyAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/networkproxy/DefaultNetworkProxyAdmin.java
index bf0bde93b..321c88b29 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/networkproxy/DefaultNetworkProxyAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/networkproxy/DefaultNetworkProxyAdmin.java
@@ -47,7 +47,7 @@ public class DefaultNetworkProxyAdmin
throws RepositoryAdminException
{
List<NetworkProxy> networkProxies =
- new ArrayList<NetworkProxy>( getArchivaConfiguration().getConfiguration().getNetworkProxies().size() );
+ new ArrayList<>( getArchivaConfiguration().getConfiguration().getNetworkProxies().size() );
for ( NetworkProxyConfiguration networkProxyConfiguration : getArchivaConfiguration().getConfiguration().getNetworkProxies() )
{
networkProxies.add( getNetworkProxy( networkProxyConfiguration ) );
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 bd9fdab40..22fc10bfa 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
@@ -63,7 +63,7 @@ public class DefaultProxyConnectorAdmin
{
List<ProxyConnectorConfiguration> proxyConnectorConfigurations =
getArchivaConfiguration().getConfiguration().getProxyConnectors();
- List<ProxyConnector> proxyConnectors = new ArrayList<ProxyConnector>( proxyConnectorConfigurations.size() );
+ List<ProxyConnector> proxyConnectors = new ArrayList<>( proxyConnectorConfigurations.size() );
for ( ProxyConnectorConfiguration configuration : proxyConnectorConfigurations )
{
proxyConnectors.add( getProxyConnector( configuration ) );
@@ -152,7 +152,7 @@ public class DefaultProxyConnectorAdmin
{
if ( patterns != null )
{
- List<String> rawPatterns = new ArrayList<String>( patterns.size() );
+ List<String> rawPatterns = new ArrayList<>( patterns.size() );
for ( String pattern : patterns )
{
rawPatterns.add( StringUtils.replace( pattern, "\\\\", "\\" ) );
@@ -177,7 +177,7 @@ public class DefaultProxyConnectorAdmin
List<ProxyConnector> connectors = proxyConnectorMap.get( key );
if ( connectors == null )
{
- connectors = new ArrayList<ProxyConnector>( 1 );
+ connectors = new ArrayList<>( 1 );
proxyConnectorMap.put( key, connectors );
}
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnectorrule/DefaultProxyConnectorRuleAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnectorrule/DefaultProxyConnectorRuleAdmin.java
index 71b656058..276808eba 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnectorrule/DefaultProxyConnectorRuleAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnectorrule/DefaultProxyConnectorRuleAdmin.java
@@ -41,7 +41,7 @@ import java.util.List;
* @author Olivier Lamy
* @since 1.4-M3
*/
-@Service ("proxyConnectorRuleAdmin#default")
+@Service("proxyConnectorRuleAdmin#default")
public class DefaultProxyConnectorRuleAdmin
extends AbstractRepositoryAdmin
implements ProxyConnectorRuleAdmin
@@ -57,8 +57,7 @@ public class DefaultProxyConnectorRuleAdmin
{
return Collections.emptyList();
}
- List<ProxyConnectorRule> proxyConnectorRules =
- new ArrayList<ProxyConnectorRule>( proxyConnectorRuleConfigurations.size() );
+ List<ProxyConnectorRule> proxyConnectorRules = new ArrayList<>( proxyConnectorRuleConfigurations.size() );
for ( ProxyConnectorRuleConfiguration proxyConnectorRuleConfiguration : proxyConnectorRuleConfigurations )
{
@@ -120,8 +119,7 @@ public class DefaultProxyConnectorRuleAdmin
boolean toSave = false;
- List<ProxyConnectorRuleConfiguration> proxyConnectorRuleConfigurations =
- new ArrayList<ProxyConnectorRuleConfiguration>();
+ List<ProxyConnectorRuleConfiguration> proxyConnectorRuleConfigurations = new ArrayList<>();
for ( ProxyConnectorRuleConfiguration proxyConnectorRuleConfiguration : configuration.getProxyConnectorRuleConfigurations() )
{
@@ -157,7 +155,7 @@ public class DefaultProxyConnectorRuleAdmin
proxyConnectorRule.getProxyConnectorRuleType().getRuleType() ) )
{
List<ProxyConnectorConfiguration> proxyConnectors =
- new ArrayList<ProxyConnectorConfiguration>( proxyConnectorRule.getProxyConnectors().size() );
+ new ArrayList<>( proxyConnectorRule.getProxyConnectors().size() );
for ( ProxyConnector proxyConnector : proxyConnectorRule.getProxyConnectors() )
{
ProxyConnectorConfiguration proxyConnectorConfiguration = new ProxyConnectorConfiguration();
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 058670bcd..c5d17a955 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
@@ -52,7 +52,7 @@ import java.util.Map;
* @author Olivier Lamy
* @since 1.4-M1
*/
-@Service ( "remoteRepositoryAdmin#default" )
+@Service("remoteRepositoryAdmin#default")
public class DefaultRemoteRepositoryAdmin
extends AbstractRepositoryAdmin
implements RemoteRepositoryAdmin
@@ -115,8 +115,8 @@ public class DefaultRemoteRepositoryAdmin
public List<RemoteRepository> getRemoteRepositories()
throws RepositoryAdminException
{
- List<RemoteRepository> remoteRepositories = new ArrayList<RemoteRepository>(
- getArchivaConfiguration().getConfiguration().getRemoteRepositories().size() );
+ List<RemoteRepository> remoteRepositories =
+ new ArrayList<>( getArchivaConfiguration().getConfiguration().getRemoteRepositories().size() );
for ( RemoteRepositoryConfiguration repositoryConfiguration : getArchivaConfiguration().getConfiguration().getRemoteRepositories() )
{
RemoteRepository remoteRepository =
@@ -199,8 +199,7 @@ public class DefaultRemoteRepositoryAdmin
// TODO use ProxyConnectorAdmin interface ?
// [MRM-520] Proxy Connectors are not deleted with the deletion of a Repository.
- List<ProxyConnectorConfiguration> proxyConnectors =
- new ArrayList<ProxyConnectorConfiguration>( configuration.getProxyConnectors() );
+ List<ProxyConnectorConfiguration> proxyConnectors = new ArrayList<>( configuration.getProxyConnectors() );
for ( ProxyConnectorConfiguration proxyConnector : proxyConnectors )
{
if ( StringUtils.equals( proxyConnector.getTargetRepoId(), repositoryId ) )
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
index 0ed081925..356f00cdb 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
@@ -52,7 +52,7 @@ import java.util.Set;
* @author Olivier Lamy
* @since 1.4-M4
*/
-@Service( "redbackRuntimeConfigurationAdmin#default" )
+@Service("redbackRuntimeConfigurationAdmin#default")
public class DefaultRedbackRuntimeConfigurationAdmin
extends AbstractRepositoryAdmin
implements RedbackRuntimeConfigurationAdmin, UserConfiguration
@@ -68,9 +68,9 @@ public class DefaultRedbackRuntimeConfigurationAdmin
@Inject
public DefaultRedbackRuntimeConfigurationAdmin( ArchivaConfiguration archivaConfiguration,//
- @Named( value = "userConfiguration#redback" ) //
+ @Named(value = "userConfiguration#redback") //
UserConfiguration userConfiguration,
- @Named( value = "cache#users" ) Cache usersCache )
+ @Named(value = "cache#users") Cache usersCache )
{
this.archivaConfiguration = archivaConfiguration;
this.userConfiguration = userConfiguration;
@@ -164,7 +164,7 @@ public class DefaultRedbackRuntimeConfigurationAdmin
Collection<String> keys = userConfiguration.getKeys();
- List<LdapGroupMapping> ldapGroupMappings = new ArrayList<LdapGroupMapping>();
+ List<LdapGroupMapping> ldapGroupMappings = new ArrayList<>();
for ( String key : keys )
{
@@ -344,7 +344,7 @@ public class DefaultRedbackRuntimeConfigurationAdmin
if ( mappings != null && mappings.size() > 0 )
{
- List<LdapGroupMapping> ldapGroupMappings = new ArrayList<LdapGroupMapping>( mappings.size() );
+ List<LdapGroupMapping> ldapGroupMappings = new ArrayList<>( mappings.size() );
for ( org.apache.archiva.configuration.LdapGroupMapping mapping : mappings )
{
@@ -417,7 +417,7 @@ public class DefaultRedbackRuntimeConfigurationAdmin
{
List<org.apache.archiva.configuration.LdapGroupMapping> mappings =
- new ArrayList<org.apache.archiva.configuration.LdapGroupMapping>( ldapGroupMappings.size() );
+ new ArrayList<>( ldapGroupMappings.size() );
for ( LdapGroupMapping ldapGroupMapping : ldapGroupMappings )
{
@@ -425,7 +425,7 @@ public class DefaultRedbackRuntimeConfigurationAdmin
org.apache.archiva.configuration.LdapGroupMapping mapping =
new org.apache.archiva.configuration.LdapGroupMapping();
mapping.setGroup( ldapGroupMapping.getGroup() );
- mapping.setRoleNames( new ArrayList<String>( ldapGroupMapping.getRoleNames() ) );
+ mapping.setRoleNames( new ArrayList<>( ldapGroupMapping.getRoleNames() ) );
mappings.add( mapping );
}
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockAuditListener.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockAuditListener.java
index 42387a64d..37135a1f9 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockAuditListener.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockAuditListener.java
@@ -33,7 +33,7 @@ public class MockAuditListener
implements AuditListener
{
- private List<AuditEvent> auditEvents = new ArrayList<AuditEvent>();
+ private List<AuditEvent> auditEvents = new ArrayList<>();
public void auditEvent( AuditEvent event )
{