@@ -53,8 +53,8 @@ import java.util.Properties; | |||
/** | |||
* ArchivaCli | |||
* | |||
* | |||
* <p/> | |||
* <p/> | |||
* TODO add back reading of archiva.xml from a given location | |||
*/ | |||
public class ArchivaCli | |||
@@ -75,8 +75,6 @@ public class ArchivaCli | |||
throws IOException | |||
{ | |||
try (InputStream pomStream = ArchivaCli.class.getResourceAsStream( POM_PROPERTIES )) | |||
{ | |||
if ( pomStream == null ) | |||
@@ -190,7 +188,7 @@ public class ArchivaCli | |||
} | |||
} | |||
private <T>T lookup( Class<T> clazz ) | |||
private <T> T lookup( Class<T> clazz ) | |||
throws PlexusSisuBridgeException | |||
{ | |||
PlexusSisuBridge plexusSisuBridge = applicationContext.getBean( PlexusSisuBridge.class ); | |||
@@ -244,8 +242,7 @@ public class ArchivaCli | |||
// we use a naming conventions knownRepositoryContentConsumer#hint | |||
// with plexus we used only hint so remove before# | |||
Map<String, KnownRepositoryContentConsumer> smallNames = | |||
new HashMap<String, KnownRepositoryContentConsumer>( beans.size() ); | |||
Map<String, KnownRepositoryContentConsumer> smallNames = new HashMap<>( beans.size() ); | |||
for ( Map.Entry<String, KnownRepositoryContentConsumer> entry : beans.entrySet() ) | |||
{ | |||
@@ -262,8 +259,7 @@ public class ArchivaCli | |||
Properties p = new Properties(); | |||
try(FileInputStream fis = new FileInputStream( properties )) | |||
try (FileInputStream fis = new FileInputStream( properties )) | |||
{ | |||
p.load( fis ); | |||
} |
@@ -92,7 +92,7 @@ public class LegacyToDefaultConverter | |||
private boolean dryrun; | |||
private Map<Artifact, List<String>> warnings = new HashMap<Artifact, List<String>>(); | |||
private Map<Artifact, List<String>> warnings = new HashMap<>(); | |||
@PostConstruct | |||
public void initialize() |
@@ -279,7 +279,7 @@ public class DefaultArchivaConfiguration | |||
// Fix policies | |||
boolean connectorValid = true; | |||
Map<String, String> policies = new HashMap<String, String>(); | |||
Map<String, String> policies = new HashMap<>(); | |||
// Make copy of policies | |||
policies.putAll( connector.getPolicies() ); | |||
// Clear out policies |
@@ -45,7 +45,7 @@ import java.util.Map; | |||
/** | |||
* FileTypes | |||
*/ | |||
@Service ("fileTypes") | |||
@Service("fileTypes") | |||
public class FileTypes | |||
implements RegistryListener | |||
{ | |||
@@ -57,17 +57,14 @@ public class FileTypes | |||
public static final String IGNORED = "ignored"; | |||
/** | |||
* | |||
*/ | |||
@Inject | |||
@Named (value = "archivaConfiguration#default") | |||
@Named(value = "archivaConfiguration#default") | |||
private ArchivaConfiguration archivaConfiguration; | |||
/** | |||
* Map of default values for the file types. | |||
*/ | |||
private Map<String, List<String>> defaultTypeMap = new HashMap<String, List<String>>(); | |||
private Map<String, List<String>> defaultTypeMap = new HashMap<>(); | |||
private List<String> artifactPatterns; | |||
@@ -87,15 +84,14 @@ public class FileTypes | |||
/** | |||
* Get the list of patterns for a specified filetype. | |||
* | |||
* <p> | |||
* <p/> | |||
* <p/> | |||
* You will always get a list. In this order. | |||
* <ul> | |||
* <li>The Configured List</li> | |||
* <li>The Default List</li> | |||
* <li>A single item list of <code>"**/*"</code></li> | |||
* </ul> | |||
* | |||
* | |||
* @param id the id to lookup. | |||
* @return the list of patterns. |
@@ -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 ) | |||
{ |
@@ -47,14 +47,8 @@ public class AutoRenameConsumer | |||
extends AbstractMonitoredConsumer | |||
implements KnownRepositoryContentConsumer | |||
{ | |||
/** | |||
* default-value="auto-rename" | |||
*/ | |||
private String id = "auto-rename"; | |||
/** | |||
* default-value="Automatically rename common artifact mistakes." | |||
*/ | |||
private String description = "Automatically rename common artifact mistakes."; | |||
private static final String RENAME_FAILURE = "rename_failure"; | |||
@@ -63,7 +57,7 @@ public class AutoRenameConsumer | |||
private List<String> includes = new ArrayList<>( 3 ); | |||
private Map<String, String> extensionRenameMap = new HashMap<String, String>(); | |||
private Map<String, String> extensionRenameMap = new HashMap<>(); | |||
public AutoRenameConsumer() | |||
{ |
@@ -41,7 +41,7 @@ public class Lock | |||
private AtomicBoolean write; | |||
private final Map<Thread, AtomicInteger> fileClients = new HashMap<Thread, AtomicInteger>(); | |||
private final Map<Thread, AtomicInteger> fileClients = new HashMap<>(); | |||
private FileLock fileLock; | |||
@@ -31,7 +31,7 @@ import java.util.Map; | |||
*/ | |||
public class SearchResults | |||
{ | |||
private Map<String, SearchResultHit> hits = new HashMap<String, SearchResultHit>(); | |||
private Map<String, SearchResultHit> hits = new HashMap<>(); | |||
private int totalHits; | |||
@@ -35,7 +35,7 @@ public class WagonFactoryRequest | |||
*/ | |||
private String protocol; | |||
private Map<String, String> headers = new HashMap<String, String>(); | |||
private Map<String, String> headers = new HashMap<>(); | |||
private String userAgent = "Java-Archiva"; | |||
@@ -72,7 +72,7 @@ public class WagonFactoryRequest | |||
{ | |||
if ( this.headers == null ) | |||
{ | |||
this.headers = new HashMap<String, String>(); | |||
this.headers = new HashMap<>(); | |||
} | |||
return headers; | |||
} |
@@ -134,7 +134,7 @@ public class DefaultRepositoryProxyConnectors | |||
@Inject | |||
private UrlFailureCache urlFailureCache; | |||
private Map<String, List<ProxyConnector>> proxyConnectorMap = new HashMap<String, List<ProxyConnector>>(); | |||
private Map<String, List<ProxyConnector>> proxyConnectorMap = new HashMap<>(); | |||
private Map<String, ProxyInfo> networkProxyMap = new ConcurrentHashMap<String, ProxyInfo>(); | |||
@@ -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; |
@@ -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 |
@@ -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() ); |
@@ -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; | |||
} |
@@ -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 ) | |||
{ |
@@ -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<>(); |
@@ -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() ) ) |
@@ -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() ) |
@@ -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() ) | |||
{ |
@@ -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; |
@@ -36,7 +36,7 @@ public class ArtifactClassifierMapping | |||
static | |||
{ | |||
// note additional 's' on type as these are maven 1.x directory components | |||
typeToClassifierMap = new HashMap<String, String>(); | |||
typeToClassifierMap = new HashMap<>( 3 ); | |||
typeToClassifierMap.put( "java-sources", "sources" ); | |||
typeToClassifierMap.put( "javadoc.jars", "javadoc" ); | |||
typeToClassifierMap.put( "javadocs", "javadoc" ); |
@@ -48,7 +48,7 @@ import java.util.Map; | |||
/** | |||
* RepositoryContentConsumerUtil | |||
*/ | |||
@Service ("repositoryContentConsumers") | |||
@Service( "repositoryContentConsumers" ) | |||
public class RepositoryContentConsumers | |||
implements ApplicationContextAware | |||
{ | |||
@@ -119,7 +119,7 @@ public class RepositoryContentConsumers | |||
public Map<String, KnownRepositoryContentConsumer> getSelectedKnownConsumersMap() | |||
throws RepositoryAdminException | |||
{ | |||
Map<String, KnownRepositoryContentConsumer> consumerMap = new HashMap<String, KnownRepositoryContentConsumer>(); | |||
Map<String, KnownRepositoryContentConsumer> consumerMap = new HashMap<>(); | |||
for ( KnownRepositoryContentConsumer consumer : getSelectedKnownConsumers() ) | |||
{ | |||
@@ -138,8 +138,7 @@ public class RepositoryContentConsumers | |||
public Map<String, InvalidRepositoryContentConsumer> getSelectedInvalidConsumersMap() | |||
throws RepositoryAdminException | |||
{ | |||
Map<String, InvalidRepositoryContentConsumer> consumerMap = | |||
new HashMap<String, InvalidRepositoryContentConsumer>(); | |||
Map<String, InvalidRepositoryContentConsumer> consumerMap = new HashMap<>(); | |||
for ( InvalidRepositoryContentConsumer consumer : getSelectedInvalidConsumers() ) | |||
{ | |||
@@ -154,7 +153,7 @@ public class RepositoryContentConsumers | |||
* selected according to the active configuration. | |||
* | |||
* @return the list of {@link KnownRepositoryContentConsumer} that have been selected | |||
* by the active configuration. | |||
* by the active configuration. | |||
*/ | |||
public synchronized List<KnownRepositoryContentConsumer> getSelectedKnownConsumers() | |||
throws RepositoryAdminException | |||
@@ -183,7 +182,7 @@ public class RepositoryContentConsumers | |||
* selected according to the active configuration. | |||
* | |||
* @return the list of {@link InvalidRepositoryContentConsumer} that have been selected | |||
* by the active configuration. | |||
* by the active configuration. | |||
*/ | |||
public synchronized List<InvalidRepositoryContentConsumer> getSelectedInvalidConsumers() | |||
throws RepositoryAdminException | |||
@@ -215,12 +214,11 @@ public class RepositoryContentConsumers | |||
* available and present in the classpath and as components in the IoC. | |||
* | |||
* @return the list of all available {@link KnownRepositoryContentConsumer} present in the classpath | |||
* and as a component in the IoC. | |||
* and as a component in the IoC. | |||
*/ | |||
public List<KnownRepositoryContentConsumer> getAvailableKnownConsumers() | |||
{ | |||
return new ArrayList<>( | |||
applicationContext.getBeansOfType( KnownRepositoryContentConsumer.class ).values() ); | |||
return new ArrayList<>( applicationContext.getBeansOfType( KnownRepositoryContentConsumer.class ).values() ); | |||
} | |||
/** | |||
@@ -228,12 +226,11 @@ public class RepositoryContentConsumers | |||
* available and present in the classpath and as components in the IoC. | |||
* | |||
* @return the list of all available {@link InvalidRepositoryContentConsumer} present in the classpath | |||
* and as a component in the IoC. | |||
* and as a component in the IoC. | |||
*/ | |||
public List<InvalidRepositoryContentConsumer> getAvailableInvalidConsumers() | |||
{ | |||
return new ArrayList<>( | |||
applicationContext.getBeansOfType( InvalidRepositoryContentConsumer.class ).values() ); | |||
return new ArrayList<>( applicationContext.getBeansOfType( InvalidRepositoryContentConsumer.class ).values() ); | |||
} | |||
/** |
@@ -43,8 +43,6 @@ import java.util.Map; | |||
/** | |||
* RepositoryScannerInstance | |||
* | |||
* | |||
*/ | |||
public class RepositoryScannerInstance | |||
implements DirectoryWalkListener | |||
@@ -83,8 +81,8 @@ public class RepositoryScannerInstance | |||
this.knownConsumers = knownConsumerList; | |||
this.invalidConsumers = invalidConsumerList; | |||
consumerTimings = new HashMap<String, Long>(); | |||
consumerCounts = new HashMap<String, Long>(); | |||
consumerTimings = new HashMap<>(); | |||
consumerCounts = new HashMap<>(); | |||
this.consumerProcessFile = new ConsumerProcessFileClosure(); | |||
consumerProcessFile.setExecuteOnEntireRepo( true ); |
@@ -33,7 +33,7 @@ public class LatinEntities | |||
static | |||
{ | |||
defaultEntityMap = new HashMap<String, String>(); | |||
defaultEntityMap = new HashMap<>(); | |||
defaultEntityMap.put( "nbsp", "\u00a0" ); | |||
defaultEntityMap.put( "iexcl", "\u00a1" ); |
@@ -56,7 +56,7 @@ public class XMLReader | |||
private Document document; | |||
private Map<String, String> namespaceMap = new HashMap<String, String>(); | |||
private Map<String, String> namespaceMap = new HashMap<>(); | |||
public XMLReader( String type, File file ) | |||
throws XMLException |
@@ -35,7 +35,7 @@ import java.util.Map; | |||
public class TestRepositoryStatisticsManager | |||
implements RepositoryStatisticsManager | |||
{ | |||
private Map<String, List<RepositoryStatistics>> repoStats = new HashMap<String, List<RepositoryStatistics>>(); | |||
private Map<String, List<RepositoryStatistics>> repoStats = new HashMap<>(); | |||
public boolean hasStatistics( MetadataRepository metadataRepository, String repositoryId ) | |||
throws MetadataRepositoryException |
@@ -182,7 +182,7 @@ public abstract class AbstractRestService | |||
// as per convention we named spring bean role#hint remove role# if exists | |||
Map<String, T> springBeans = applicationContext.getBeansOfType( clazz ); | |||
Map<String, T> beans = new HashMap<String, T>( springBeans.size() ); | |||
Map<String, T> beans = new HashMap<>( springBeans.size() ); | |||
for ( Map.Entry<String, T> entry : springBeans.entrySet() ) | |||
{ |
@@ -195,8 +195,7 @@ public class DefaultBrowseService | |||
{ | |||
repositorySession.close(); | |||
} | |||
List<BrowseResultEntry> browseGroupResultEntries = | |||
new ArrayList<>( namespaces.size() + projects.size() ); | |||
List<BrowseResultEntry> browseGroupResultEntries = new ArrayList<>( namespaces.size() + projects.size() ); | |||
for ( String namespace : namespaces ) | |||
{ | |||
browseGroupResultEntries.add( new BrowseResultEntry( namespace, false ).groupId( namespace ) ); | |||
@@ -571,7 +570,7 @@ public class DefaultBrowseService | |||
return Boolean.FALSE; | |||
} | |||
Map<String, String> properties = new HashMap<String, String>(); | |||
Map<String, String> properties = new HashMap<>(); | |||
MetadataFacet metadataFacet = projectVersionMetadata.getFacet( GenericMetadataFacet.FACET_ID ); | |||
@@ -972,7 +971,7 @@ public class DefaultBrowseService | |||
protected List<ArtifactContentEntry> readFileEntries( File file, String filterPath, String repoId ) | |||
throws IOException | |||
{ | |||
Map<String, ArtifactContentEntry> artifactContentEntryMap = new HashMap<String, ArtifactContentEntry>(); | |||
Map<String, ArtifactContentEntry> artifactContentEntryMap = new HashMap<>(); | |||
int filterDepth = StringUtils.countMatches( filterPath, "/" ); | |||
/*if ( filterDepth == 0 ) | |||
{ | |||
@@ -1013,8 +1012,7 @@ public class DefaultBrowseService | |||
if ( StringUtils.isNotEmpty( filterPath ) ) | |||
{ | |||
Map<String, ArtifactContentEntry> filteredArtifactContentEntryMap = | |||
new HashMap<String, ArtifactContentEntry>(); | |||
Map<String, ArtifactContentEntry> filteredArtifactContentEntryMap = new HashMap<>(); | |||
for ( Map.Entry<String, ArtifactContentEntry> entry : artifactContentEntryMap.entrySet() ) | |||
{ | |||
@@ -1045,7 +1043,7 @@ public class DefaultBrowseService | |||
private List<ArtifactContentEntry> getSmallerDepthEntries( Map<String, ArtifactContentEntry> entries ) | |||
{ | |||
int smallestDepth = Integer.MAX_VALUE; | |||
Map<Integer, List<ArtifactContentEntry>> perDepthList = new HashMap<Integer, List<ArtifactContentEntry>>(); | |||
Map<Integer, List<ArtifactContentEntry>> perDepthList = new HashMap<>(); | |||
for ( Map.Entry<String, ArtifactContentEntry> entry : entries.entrySet() ) | |||
{ | |||
@@ -49,7 +49,7 @@ public class BrowseServiceTest | |||
Map<String, String> toMap( List<Entry> entries ) | |||
{ | |||
Map<String, String> map = new HashMap<String, String>( entries.size() ); | |||
Map<String, String> map = new HashMap<>( entries.size() ); | |||
for ( Entry entry : entries ) | |||
{ | |||
@@ -487,7 +487,7 @@ public class BrowseServiceTest | |||
BrowseService browseService = getBrowseService( authorizationHeader, false ); | |||
Map<String, String> inputMetadata = new HashMap<String, String>( 3 ); | |||
Map<String, String> inputMetadata = new HashMap<>( 3 ); | |||
inputMetadata.put( "buildNumber", "1" ); | |||
inputMetadata.put( "author", "alecharp" ); | |||
inputMetadata.put( "jenkins_version", "1.486" ); |
@@ -86,7 +86,7 @@ public class NewArtifactsRssFeedProcessorTest | |||
metadataRepository.setArtifactsByDateRange( newArtifacts ); | |||
Map<String, String> reqParams = new HashMap<String, String>(); | |||
Map<String, String> reqParams = new HashMap<>(); | |||
reqParams.put( RssFeedProcessor.KEY_REPO_ID, TEST_REPO ); | |||
SyndFeed feed = newArtifactsProcessor.process( reqParams, metadataRepository ); |
@@ -84,7 +84,7 @@ public class NewVersionsOfArtifactRssFeedProcessorTest | |||
ArtifactMetadata artifact3 = createArtifact( whenGatheredNext, "1.0.3-SNAPSHOT" ); | |||
Map<String, String> reqParams = new HashMap<String, String>(); | |||
Map<String, String> reqParams = new HashMap<>(); | |||
reqParams.put( RssFeedProcessor.KEY_GROUP_ID, GROUP_ID ); | |||
reqParams.put( RssFeedProcessor.KEY_ARTIFACT_ID, ARTIFACT_ID ); | |||
@@ -131,7 +131,7 @@ public class RssFeedServlet | |||
try | |||
{ | |||
Map<String, String> map = new HashMap<String, String>(); | |||
Map<String, String> map = new HashMap<>(); | |||
SyndFeed feed = null; | |||
if ( isAllowed( req, repoId, groupId, artifactId ) ) |
@@ -132,7 +132,7 @@ public class ArchivaLdapRoleMapperConfiguration | |||
return Collections.emptyMap(); | |||
} | |||
Map<String, Collection<String>> res = new HashMap<String, Collection<String>>( ldapGroupMappings.size() ); | |||
Map<String, Collection<String>> res = new HashMap<>( ldapGroupMappings.size() ); | |||
for ( LdapGroupMapping ldapGroupMapping : ldapGroupMappings ) | |||
{ |
@@ -225,7 +225,7 @@ public class ArchivaRbacManager | |||
public List<Role> getAllRoles() | |||
throws RbacManagerException | |||
{ | |||
Map<String, Role> allRoles = new HashMap<String, Role>(); | |||
Map<String, Role> allRoles = new HashMap<>(); | |||
boolean allFailed = true; | |||
Exception lastException = null; | |||
for ( RBACManager rbacManager : rbacManagersPerId.values() ) | |||
@@ -357,7 +357,7 @@ public class ArchivaRbacManager | |||
public List<Permission> getAllPermissions() | |||
throws RbacManagerException | |||
{ | |||
Map<String, Permission> allPermissions = new HashMap<String, Permission>(); | |||
Map<String, Permission> allPermissions = new HashMap<>(); | |||
boolean allFailed = true; | |||
Exception lastException = null; | |||
for ( RBACManager rbacManager : rbacManagersPerId.values() ) | |||
@@ -481,7 +481,7 @@ public class ArchivaRbacManager | |||
public List<Operation> getAllOperations() | |||
throws RbacManagerException | |||
{ | |||
Map<String, Operation> allOperations = new HashMap<String, Operation>(); | |||
Map<String, Operation> allOperations = new HashMap<>(); | |||
boolean allFailed = true; | |||
Exception lastException = null; | |||
for ( RBACManager rbacManager : rbacManagersPerId.values() ) | |||
@@ -605,7 +605,7 @@ public class ArchivaRbacManager | |||
public List<Resource> getAllResources() | |||
throws RbacManagerException | |||
{ | |||
Map<String, Resource> allResources = new HashMap<String, Resource>(); | |||
Map<String, Resource> allResources = new HashMap<>(); | |||
boolean allFailed = true; | |||
Exception lastException = null; | |||
for ( RBACManager rbacManager : rbacManagersPerId.values() ) | |||
@@ -788,7 +788,7 @@ public class ArchivaRbacManager | |||
public List<UserAssignment> getAllUserAssignments() | |||
throws RbacManagerException | |||
{ | |||
Map<String, UserAssignment> allUserAssignments = new HashMap<String, UserAssignment>(); | |||
Map<String, UserAssignment> allUserAssignments = new HashMap<>(); | |||
boolean allFailed = true; | |||
Exception lastException = null; | |||
for ( RBACManager rbacManager : rbacManagersPerId.values() ) |
@@ -86,7 +86,7 @@ public class SecuritySynchronization | |||
// as per convention we named spring bean role#hint remove role# if exists | |||
Map<String, T> springBeans = applicationContext.getBeansOfType( clazz ); | |||
Map<String, T> beans = new HashMap<String, T>( springBeans.size() ); | |||
Map<String, T> beans = new HashMap<>( springBeans.size() ); | |||
for ( Entry<String, T> entry : springBeans.entrySet() ) | |||
{ |
@@ -50,7 +50,7 @@ import java.util.Map; | |||
public class SecuritySystemStub | |||
implements SecuritySystem | |||
{ | |||
Map<String, String> users = new HashMap<String, String>(); | |||
Map<String, String> users = new HashMap<>(); | |||
List<String> repoIds = new ArrayList<>(); | |||
@@ -36,18 +36,18 @@ import java.util.Set; | |||
public class TestMetadataResolver | |||
implements MetadataResolver | |||
{ | |||
private Map<String, ProjectVersionMetadata> projectVersions = new HashMap<String, ProjectVersionMetadata>(); | |||
private Map<String, ProjectVersionMetadata> projectVersions = new HashMap<>(); | |||
private Map<String, List<ArtifactMetadata>> artifacts = new HashMap<String, List<ArtifactMetadata>>(); | |||
private Map<String, List<ArtifactMetadata>> artifacts = new HashMap<>(); | |||
private Map<String, List<ProjectVersionReference>> references = | |||
new HashMap<String, List<ProjectVersionReference>>(); | |||
private Map<String, List<String>> namespaces = new HashMap<String, List<String>>(); | |||
private Map<String, List<String>> namespaces = new HashMap<>(); | |||
private Map<String, Collection<String>> projectsInNamespace = new HashMap<String, Collection<String>>(); | |||
private Map<String, Collection<String>> projectsInNamespace = new HashMap<>(); | |||
private Map<String, Collection<String>> versionsInProject = new HashMap<String, Collection<String>>(); | |||
private Map<String, Collection<String>> versionsInProject = new HashMap<>(); | |||
public ProjectVersionMetadata resolveProjectVersion( RepositorySession repositorySession, String repoId, | |||
String namespace, String projectId, String projectVersion ) |
@@ -1291,7 +1291,7 @@ public class ArchivaDavResourceFactory | |||
TemporaryGroupIndexSessionCleaner.TEMPORARY_INDEX_SESSION_KEY ); | |||
if ( temporaryGroupIndexMap == null ) | |||
{ | |||
temporaryGroupIndexMap = new HashMap<String, TemporaryGroupIndex>(); | |||
temporaryGroupIndexMap = new HashMap<>(); | |||
} | |||
TemporaryGroupIndex tmp = temporaryGroupIndexMap.get( repositoryGroupConfiguration.getId() ); |
@@ -151,7 +151,7 @@ public class IndexWriter | |||
else | |||
{ | |||
// virtual repository - filter unique directories | |||
Map<String, List<String>> uniqueChildFiles = new HashMap<String, List<String>>(); | |||
Map<String, List<String>> uniqueChildFiles = new HashMap<>(); | |||
List<String> sortedList = new ArrayList<>(); | |||
for ( File resource : localResources ) | |||
{ |
@@ -50,7 +50,7 @@ public class MimeTypes | |||
private String resource = "org/apache/archiva/webdav/util/mime.types"; | |||
private Map<String, String> mimeMap = new HashMap<String, String>(); | |||
private Map<String, String> mimeMap = new HashMap<>(); | |||
private Logger log = LoggerFactory.getLogger( MimeTypes.class ); | |||
@@ -53,7 +53,7 @@ public class TemporaryGroupIndexSessionCleaner | |||
if ( httpSessionEvent.getSession().getAttribute( TEMPORARY_INDEX_SESSION_KEY ) == null ) | |||
{ | |||
httpSessionEvent.getSession().setAttribute( TEMPORARY_INDEX_SESSION_KEY, | |||
new HashMap<String, TemporaryGroupIndex>() ); | |||
new HashMap<>() ); | |||
} | |||
if ( indexMerger == null ) |
@@ -91,7 +91,7 @@ public class MavenArtifactFacet | |||
public Map<String, String> toProperties() | |||
{ | |||
Map<String, String> properties = new HashMap<String, String>(); | |||
Map<String, String> properties = new HashMap<>(); | |||
properties.put( "type", type ); | |||
if ( classifier != null ) | |||
{ |
@@ -32,7 +32,7 @@ public abstract class FacetedMetadata | |||
/** | |||
* The facets to store, keyed by the {@linkplain MetadataFacet#getFacetId() Facet ID} of the metadata. | |||
*/ | |||
private Map<String, MetadataFacet> facets = new HashMap<String, MetadataFacet>(); | |||
private Map<String, MetadataFacet> facets = new HashMap<>(); | |||
/** | |||
* Add a new facet to the metadata. If it already exists, it will be replaced. |
@@ -94,7 +94,7 @@ public abstract class AbstractMetadataRepositoryTest | |||
protected static Map<String, MetadataFacetFactory> createTestMetadataFacetFactories() | |||
{ | |||
Map<String, MetadataFacetFactory> factories = new HashMap<String, MetadataFacetFactory>(); | |||
Map<String, MetadataFacetFactory> factories = new HashMap<>(); | |||
factories.put( TEST_FACET_ID, new MetadataFacetFactory() | |||
{ | |||
public MetadataFacet createMetadataFacet() | |||
@@ -461,7 +461,7 @@ public abstract class AbstractMetadataRepositoryTest | |||
ProjectVersionMetadata metadata = new ProjectVersionMetadata(); | |||
metadata.setId( TEST_PROJECT_VERSION ); | |||
Map<String, String> additionalProps = new HashMap<String, String>(); | |||
Map<String, String> additionalProps = new HashMap<>(); | |||
additionalProps.put( "deleteKey", "deleteValue" ); | |||
MetadataFacet facet = new TestMetadataFacet( TEST_FACET_ID, "baz", additionalProps ); | |||
@@ -529,7 +529,7 @@ public abstract class AbstractMetadataRepositoryTest | |||
{ | |||
ArtifactMetadata metadata = createArtifact(); | |||
Map<String, String> additionalProps = new HashMap<String, String>(); | |||
Map<String, String> additionalProps = new HashMap<>(); | |||
additionalProps.put( "deleteKey", "deleteValue" ); | |||
MetadataFacet facet = new TestMetadataFacet( TEST_FACET_ID, "baz", additionalProps ); | |||
@@ -1555,7 +1555,7 @@ public abstract class AbstractMetadataRepositoryTest | |||
} | |||
else | |||
{ | |||
Map<String, String> props = new HashMap<String, String>(); | |||
Map<String, String> props = new HashMap<>(); | |||
props.put( "foo", value ); | |||
for ( String key : additionalProps.keySet() ) | |||
@@ -1583,7 +1583,7 @@ public abstract class AbstractMetadataRepositoryTest | |||
if ( additionalProps == null ) | |||
{ | |||
additionalProps = new HashMap<String, String>(); | |||
additionalProps = new HashMap<>(); | |||
} | |||
for ( String key : properties.keySet() ) |
@@ -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 ) | |||
{ |
@@ -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 | |||
{ |
@@ -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" ); |
@@ -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() ); |
@@ -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 ); |
@@ -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" ); |
@@ -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() ) |
@@ -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 ) | |||
{ |
@@ -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() ); |
@@ -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() ) | |||
{ |
@@ -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; |
@@ -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() ) | |||
{ |
@@ -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(); |
@@ -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() ) | |||
{ |
@@ -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" ); |
@@ -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 ); |
@@ -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 ) ) | |||
{ |
@@ -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 ) ); |