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/plugins | |
parent | b244153061054a1efd45e2d07d69b751070660f2 (diff) | |
download | archiva-d6c28781b0b0f9de8142c8b96b810ab6c415cb26.tar.gz archiva-d6c28781b0b0f9de8142c8b96b810ab6c415cb26.zip |
more diamond
Diffstat (limited to 'archiva-modules/plugins')
18 files changed, 30 insertions, 30 deletions
diff --git a/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/AuditEvent.java b/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/AuditEvent.java index a73c6bc5c..9e98e30e9 100644 --- a/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/AuditEvent.java +++ b/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/AuditEvent.java @@ -259,7 +259,7 @@ public class AuditEvent public Map<String, String> toProperties() { - Map<String, String> properties = new HashMap<String, String>(); + Map<String, String> properties = new HashMap<>(); properties.put( "action", this.action ); if ( this.userId != null ) { diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java index 74bc3d9d7..e1749a955 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/Maven3DependencyTreeBuilder.java @@ -147,7 +147,7 @@ public class Maven3DependencyTreeBuilder } List<RemoteRepository> remoteRepositories = new ArrayList<>(); - Map<String, NetworkProxy> networkProxies = new HashMap<String, NetworkProxy>(); + Map<String, NetworkProxy> networkProxies = new HashMap<>(); try { diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/DefaultArtifactMappingProvider.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/DefaultArtifactMappingProvider.java index 6be451e1f..0c5afebc4 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/DefaultArtifactMappingProvider.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/DefaultArtifactMappingProvider.java @@ -37,7 +37,7 @@ public class DefaultArtifactMappingProvider public DefaultArtifactMappingProvider() { - classifierAndExtensionToTypeMap = new HashMap<String, String>(); + classifierAndExtensionToTypeMap = new HashMap<>( 4 ); // Maven 2.2.1 supplied types (excluding defaults where extension == type and no classifier) classifierAndExtensionToTypeMap.put( "client:jar", "ejb-client" ); @@ -45,7 +45,7 @@ public class DefaultArtifactMappingProvider classifierAndExtensionToTypeMap.put( "javadoc:jar", "javadoc" ); classifierAndExtensionToTypeMap.put( "tests:jar", "test-jar" ); - typeToExtensionMap = new HashMap<String, String>(); + typeToExtensionMap = new HashMap<>(); // Maven 2.2.1 supplied types (excluding defaults where extension == type and no classifier) typeToExtensionMap.put( "ejb-client", "jar" ); diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java index 0628b055a..a29241dee 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java @@ -233,7 +233,7 @@ public class Maven2RepositoryStorage // TODO: this is a workaround until we can properly resolve using proxies as well - this doesn't cache // anything locally! List<RemoteRepository> remoteRepositories = new ArrayList<>(); - Map<String, NetworkProxy> networkProxies = new HashMap<String, NetworkProxy>(); + Map<String, NetworkProxy> networkProxies = new HashMap<>(); Map<String, List<ProxyConnector>> proxyConnectorsMap = proxyConnectorAdmin.getProxyConnectorAsMap(); List<ProxyConnector> proxyConnectors = proxyConnectorsMap.get( readMetadataRequest.getRepositoryId() ); diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/MavenProjectFacet.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/MavenProjectFacet.java index 93826d8d1..9faa02fa0 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/MavenProjectFacet.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/MavenProjectFacet.java @@ -90,7 +90,7 @@ public class MavenProjectFacet public Map<String, String> toProperties() { - HashMap<String, String> properties = new HashMap<String, String>(); + HashMap<String, String> properties = new HashMap<>(); properties.put( "groupId", groupId ); properties.put( "artifactId", artifactId ); properties.put( "packaging", packaging ); diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/legacy/AbstractLegacyRepositoryContent.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/legacy/AbstractLegacyRepositoryContent.java index 8993be82f..e40292d7f 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/legacy/AbstractLegacyRepositoryContent.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/content/legacy/AbstractLegacyRepositoryContent.java @@ -44,7 +44,7 @@ public abstract class AbstractLegacyRepositoryContent static { - typeToDirectoryMap = new HashMap<String, String>(); + typeToDirectoryMap = new HashMap<>( 5 ); typeToDirectoryMap.put( "ejb-client", "ejb" ); typeToDirectoryMap.put( ArtifactExtensionMapping.MAVEN_ONE_PLUGIN, "plugin" ); typeToDirectoryMap.put( "distribution-tgz", "distribution" ); diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/configuration/MockRepoAdmin.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/configuration/MockRepoAdmin.java index 9ea29d728..85e63e59a 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/configuration/MockRepoAdmin.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/configuration/MockRepoAdmin.java @@ -216,13 +216,13 @@ public class MockRepoAdmin public Boolean updateProxyConnector( ProxyConnector proxyConnector, AuditInformation auditInformation ) throws RepositoryAdminException { - return null; //To change body of implemented methods use File | Settings | File Templates. + return null; } public Map<String, List<ProxyConnector>> getProxyConnectorAsMap() throws RepositoryAdminException { - Map<String, List<ProxyConnector>> proxyConnectorMap = new HashMap<String, List<ProxyConnector>>(); + Map<String, List<ProxyConnector>> proxyConnectorMap = new HashMap<>(); Iterator<ProxyConnector> it = getProxyConnectors().iterator(); while ( it.hasNext() ) diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java index c8f7942dd..9eb38392f 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java @@ -37,7 +37,7 @@ import java.util.Map; public class TestMetadataRepository implements MetadataRepository { - private Map<String, MetadataFacet> facets = new HashMap<String, MetadataFacet>(); + private Map<String, MetadataFacet> facets = new HashMap<>(); public void updateProject( String repoId, ProjectMetadata project ) { diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java index 67a17cd5a..86513b344 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java @@ -1041,7 +1041,7 @@ public class CassandraMetadataRepository .addEqualsExpression( "projectVersion", projectVersion ) // .execute(); - Map<String, Map<String, String>> metadataFacetsPerFacetIds = new HashMap<String, Map<String, String>>(); + Map<String, Map<String, String>> metadataFacetsPerFacetIds = new HashMap<>(); for ( Row<String, String, String> row : result.get() ) { @@ -1050,7 +1050,7 @@ public class CassandraMetadataRepository Map<String, String> metaValues = metadataFacetsPerFacetIds.get( facetId ); if ( metaValues == null ) { - metaValues = new HashMap<String, String>(); + metaValues = new HashMap<>(); metadataFacetsPerFacetIds.put( facetId, metaValues ); } metaValues.put( getStringValue( columnSlice, "key" ), getStringValue( columnSlice, "value" ) ); @@ -1578,7 +1578,7 @@ public class CassandraMetadataRepository { return null; } - Map<String, String> map = new HashMap<String, String>( size ); + Map<String, String> map = new HashMap<>( size ); for ( Row<String, String, String> row : result.get() ) { ColumnSlice<String, String> columnSlice = row.getColumnSlice(); @@ -1780,7 +1780,7 @@ public class CassandraMetadataRepository { // cql cannot run or in queries so running twice the query - Map<String, ArtifactMetadata> artifactMetadataMap = new HashMap<String, ArtifactMetadata>(); + Map<String, ArtifactMetadata> artifactMetadataMap = new HashMap<>(); RangeSlicesQuery<String, String, String> query = HFactory // .createRangeSlicesQuery( keyspace, ss, ss, ss ) // @@ -2116,7 +2116,7 @@ public class CassandraMetadataRepository if ( !facetModels.isEmpty() ) { MetadataFacet metadataFacet = metadataFacetFactory.createMetadataFacet(); - Map<String, String> props = new HashMap<String, String>( facetModels.size() ); + Map<String, String> props = new HashMap<>( facetModels.size() ); for ( MetadataFacetModel metadataFacetModel : facetModels ) { props.put( metadataFacetModel.getKey(), metadataFacetModel.getValue() ); diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java index cef2fd7ce..ef0f23986 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraRepositorySessionFactory.java @@ -65,7 +65,7 @@ public class CassandraRepositorySessionFactory applicationContext.getBeansOfType( MetadataFacetFactory.class ); // olamy with spring the "id" is now "metadataFacetFactory#hint" // whereas was only hint with plexus so let remove metadataFacetFactory# - metadataFacetFactories = new HashMap<String, MetadataFacetFactory>( tmpMetadataFacetFactories.size() ); + metadataFacetFactories = new HashMap<>( tmpMetadataFacetFactories.size() ); for ( Map.Entry<String, MetadataFacetFactory> entry : tmpMetadataFacetFactories.entrySet() ) { diff --git a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java index b373c8d5d..e12ca7a27 100644 --- a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java +++ b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java @@ -357,7 +357,7 @@ public class FileMetadataRepository if ( metadataFacetFactory != null ) { metadataFacet = metadataFacetFactory.createMetadataFacet( repositoryId, name ); - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); for ( Object key : new ArrayList( properties.keySet() ) ) { String property = (String) key; @@ -447,7 +447,7 @@ public class FileMetadataRepository public Collection<ArtifactMetadata> getArtifacts( String repoId, String namespace, String projectId, String projectVersion ) { - Map<String, ArtifactMetadata> artifacts = new HashMap<String, ArtifactMetadata>(); + Map<String, ArtifactMetadata> artifacts = new HashMap<>(); File directory = new File( getDirectory( repoId ), namespace + "/" + projectId + "/" + projectVersion ); @@ -516,7 +516,7 @@ public class FileMetadataRepository { MetadataFacet facet = factory.createMetadataFacet(); String prefix = propertyPrefix + facet.getFacetId(); - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); for ( Object key : new ArrayList( properties.keySet() ) ) { String property = (String) key; @@ -1029,7 +1029,7 @@ public class FileMetadataRepository else { MetadataFacet facet = factory.createMetadataFacet(); - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); for ( Object key : new ArrayList( properties.keySet() ) ) { String property = (String) key; diff --git a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileRepositorySessionFactory.java b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileRepositorySessionFactory.java index 54ca6ca39..0f775a2c6 100644 --- a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileRepositorySessionFactory.java +++ b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileRepositorySessionFactory.java @@ -70,7 +70,7 @@ public class FileRepositorySessionFactory applicationContext.getBeansOfType( MetadataFacetFactory.class ); // olamy with spring the "id" is now "metadataFacetFactory#hint" // whereas was only hint with plexus so let remove metadataFacetFactory# - metadataFacetFactories = new HashMap<String, MetadataFacetFactory>( tmpMetadataFacetFactories.size() ); + metadataFacetFactories = new HashMap<>( tmpMetadataFacetFactories.size() ); for ( Map.Entry<String, MetadataFacetFactory> entry : tmpMetadataFacetFactories.entrySet() ) { diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java index 2acdbaab8..cbe0f5d26 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java +++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java @@ -482,7 +482,7 @@ public class JcrMetadataRepository if ( metadataFacetFactory != null ) { metadataFacet = metadataFacetFactory.createMetadataFacet( repositoryId, name ); - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); for ( Property property : JcrUtils.getProperties( node ) ) { String p = property.getName(); @@ -931,7 +931,7 @@ public class JcrMetadataRepository else { MetadataFacet facet = factory.createMetadataFacet(); - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); for ( Property property : JcrUtils.getProperties( n ) ) { String p = property.getName(); @@ -1351,7 +1351,7 @@ public class JcrMetadataRepository else { MetadataFacet facet = factory.createMetadataFacet(); - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); for ( Property p : JcrUtils.getProperties( n ) ) { String property = p.getName(); diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java index 954743c9d..fcd7fed21 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java +++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java @@ -101,7 +101,7 @@ public class JcrRepositorySessionFactory // olamy with spring the "id" is now "metadataFacetFactory#hint" // whereas was only hint with plexus so let remove metadataFacetFactory# Map<String, MetadataFacetFactory> cleanedMetadataFacetFactories = - new HashMap<String, MetadataFacetFactory>( metadataFacetFactories.size() ); + new HashMap<>( metadataFacetFactories.size() ); for ( Map.Entry<String, MetadataFacetFactory> entry : metadataFacetFactories.entrySet() ) { diff --git a/archiva-modules/plugins/npanday-support/src/main/java/org/apache/archiva/plugins/npanday/NPandayArtifactMappingProvider.java b/archiva-modules/plugins/npanday-support/src/main/java/org/apache/archiva/plugins/npanday/NPandayArtifactMappingProvider.java index f8a60905a..76b79e282 100644 --- a/archiva-modules/plugins/npanday-support/src/main/java/org/apache/archiva/plugins/npanday/NPandayArtifactMappingProvider.java +++ b/archiva-modules/plugins/npanday-support/src/main/java/org/apache/archiva/plugins/npanday/NPandayArtifactMappingProvider.java @@ -37,7 +37,7 @@ public class NPandayArtifactMappingProvider public NPandayArtifactMappingProvider() { - extensionToTypeMap = new HashMap<String, String>(); + extensionToTypeMap = new HashMap<>(); // TODO: this could be one of many - we need to look up the artifact metadata from the POM instead // should do this anyway so that plugins don't compete for providing an extension @@ -46,7 +46,7 @@ public class NPandayArtifactMappingProvider extensionToTypeMap.put( "netmodule", "dotnet-module" ); extensionToTypeMap.put( "exe", "dotnet-executable" ); - typeToExtensionMap = new HashMap<String, String>(); + typeToExtensionMap = new HashMap<>(); typeToExtensionMap.put( "dotnet-library", "dll" ); typeToExtensionMap.put( "dotnet-library-config", "dll.config" ); typeToExtensionMap.put( "dotnet-executable", "exe" ); diff --git a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/RepositoryProblemFacet.java b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/RepositoryProblemFacet.java index 328ccf833..3262b3ec6 100644 --- a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/RepositoryProblemFacet.java +++ b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/RepositoryProblemFacet.java @@ -55,7 +55,7 @@ public class RepositoryProblemFacet public Map<String, String> toProperties() { - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put( "repositoryId", repositoryId ); map.put( "namespace", namespace ); map.put( "project", project ); diff --git a/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java b/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java index efa26c5d6..736b46501 100644 --- a/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java +++ b/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java @@ -196,7 +196,7 @@ public class DefaultRepositoryStatisticsManager QueryResult queryResult = query.execute(); - Map<String, Integer> totalByType = new HashMap<String, Integer>(); + Map<String, Integer> totalByType = new HashMap<>(); long totalSize = 0, totalArtifacts = 0; for ( Row row : JcrUtils.getRows( queryResult ) ) { diff --git a/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/RepositoryStatistics.java b/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/RepositoryStatistics.java index f32c6992f..eab3e8200 100644 --- a/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/RepositoryStatistics.java +++ b/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/RepositoryStatistics.java @@ -170,7 +170,7 @@ public class RepositoryStatistics public Map<String, String> toProperties() { - Map<String, String> properties = new HashMap<String, String>(); + Map<String, String> properties = new HashMap<>(); properties.put( "scanEndTime", String.valueOf( scanEndTime.getTime() ) ); properties.put( "scanStartTime", String.valueOf( scanStartTime.getTime() ) ); properties.put( "totalArtifactCount", String.valueOf( totalArtifactCount ) ); |