summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base
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
parentff99d5a203756c31bcf4a8a98ec4c25cb423ad74 (diff)
downloadarchiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.tar.gz
archiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.zip
use diamond operator
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r--archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java17
-rw-r--r--archiva-modules/archiva-base/archiva-artifact-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java2
-rw-r--r--archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java6
-rw-r--r--archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java2
-rw-r--r--archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/VersionComparator.java4
-rw-r--r--archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/VersionComparatorTest.java6
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java8
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java2
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java6
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java4
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java14
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java12
-rw-r--r--archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java2
-rw-r--r--archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java2
-rw-r--r--archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java2
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java4
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchFields.java2
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java2
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResults.java2
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java50
-rw-r--r--archiva-modules/archiva-base/archiva-maven2-model/src/main/java/org/apache/archiva/maven2/model/TreeEntry.java2
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaModelCloner.java4
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/AbstractUpdatePolicy.java2
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/CachedFailuresPolicy.java5
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ChecksumPolicy.java2
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsDownloadPolicy.java2
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java2
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java8
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java6
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java6
-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
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java16
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/RepositoryMetadataMerge.java2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java6
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java10
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java42
-rw-r--r--archiva-modules/archiva-base/archiva-test-utils/src/main/java/org/apache/archiva/test/utils/ListGenerator.java2
-rw-r--r--archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java10
-rw-r--r--archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/FileTransaction.java2
64 files changed, 169 insertions, 215 deletions
diff --git a/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java b/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java
index 4fe0536a9..f55e1e523 100644
--- a/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java
+++ b/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java
@@ -82,29 +82,14 @@ public class LegacyToDefaultConverter
@Inject
private DigesterUtils digesterUtils;
- /**
- *
- */
private ModelConverter translator;
- /**
- *
- */
private ArtifactFactory artifactFactory;
- /**
- *
- */
private ArtifactHandlerManager artifactHandlerManager;
- /**
- * default-value="false"
- */
private boolean force;
- /**
- * default-value="false"
- */
private boolean dryrun;
private Map<Artifact, List<String>> warnings = new HashMap<Artifact, List<String>>();
@@ -686,7 +671,7 @@ public class LegacyToDefaultConverter
List<String> messages = warnings.get( artifact );
if ( messages == null )
{
- messages = new ArrayList<String>( 1 );
+ messages = new ArrayList<>( 1 );
}
messages.add( message );
warnings.put( artifact, messages );
diff --git a/archiva-modules/archiva-base/archiva-artifact-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java b/archiva-modules/archiva-base/archiva-artifact-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java
index 2ab82c6a9..6333b4d9e 100644
--- a/archiva-modules/archiva-base/archiva-artifact-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java
+++ b/archiva-modules/archiva-base/archiva-artifact-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java
@@ -813,7 +813,7 @@ public class LegacyToDefaultConverterTest
{
// test multiple artifacts are converted
- List<Artifact> artifacts = new ArrayList<Artifact>();
+ List<Artifact> artifacts = new ArrayList<>();
artifacts.add( createArtifact( "test", "artifact-one", "1.0.0" ) );
artifacts.add( createArtifact( "test", "artifact-two", "1.0.0" ) );
artifacts.add( createArtifact( "test", "artifact-three", "1.0.0" ) );
diff --git a/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java b/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java
index b505494d2..9e9378e3b 100644
--- a/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java
+++ b/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java
@@ -20,14 +20,12 @@ package org.apache.archiva.checksum;
*/
import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -143,7 +141,7 @@ public class ChecksummedFile
try (FileInputStream fis = new FileInputStream( referenceFile ))
{
- List<Checksum> checksums = new ArrayList<Checksum>( algorithms.length );
+ List<Checksum> checksums = new ArrayList<>( algorithms.length );
// Create checksum object for each algorithm.
for ( ChecksumAlgorithm checksumAlgorithm : algorithms )
{
@@ -215,7 +213,7 @@ public class ChecksummedFile
*/
public boolean fixChecksums( ChecksumAlgorithm[] algorithms )
{
- List<Checksum> checksums = new ArrayList<Checksum>( algorithms.length );
+ List<Checksum> checksums = new ArrayList<>( algorithms.length );
// Create checksum object for each algorithm.
for ( ChecksumAlgorithm checksumAlgorithm : algorithms )
{
diff --git a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
index 7f66f16d4..11df7b9b5 100644
--- a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
+++ b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
@@ -71,7 +71,7 @@ public class ChecksumTest
{
Checksum checksumSha1 = new Checksum( ChecksumAlgorithm.SHA1 );
Checksum checksumMd5 = new Checksum( ChecksumAlgorithm.MD5 );
- List<Checksum> checksums = new ArrayList<Checksum>();
+ List<Checksum> checksums = new ArrayList<>();
checksums.add( checksumSha1 );
checksums.add( checksumMd5 );
diff --git a/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/VersionComparator.java b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/VersionComparator.java
index 73d0cd752..bbdbbd3b7 100644
--- a/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/VersionComparator.java
+++ b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/VersionComparator.java
@@ -60,7 +60,7 @@ public class VersionComparator
public VersionComparator()
{
- specialWords = new ArrayList<String>( 23 );
+ specialWords = new ArrayList<>( 23 );
// ids that refer to LATEST
specialWords.add( "final" );
@@ -204,7 +204,7 @@ public class VersionComparator
int modeDigit = 1;
int modeText = 2;
- List<String> parts = new ArrayList<String>();
+ List<String> parts = new ArrayList<>();
int len = version.length();
int i = 0;
int start = 0;
diff --git a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/VersionComparatorTest.java b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/VersionComparatorTest.java
index 59e9dde72..d21d5fe4e 100644
--- a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/VersionComparatorTest.java
+++ b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/VersionComparatorTest.java
@@ -19,13 +19,13 @@ package org.apache.archiva.common.utils;
* under the License.
*/
+import junit.framework.TestCase;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import junit.framework.TestCase;
-
/**
* VersionComparatorTest
*
@@ -97,7 +97,7 @@ public class VersionComparatorTest
private void assertSort( String[] rawVersions, String[] expectedSort )
{
- List<String> versions = new ArrayList<String>();
+ List<String> versions = new ArrayList<>();
versions.addAll( Arrays.asList( rawVersions ) );
Collections.sort( versions, VersionComparator.getInstance() );
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
index 757a116ad..1fd14aa57 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
@@ -270,7 +270,7 @@ public class DefaultArchivaConfiguration
// Create a copy of the list to read from (to prevent concurrent modification exceptions)
List<ProxyConnectorConfiguration> proxyConnectorList =
- new ArrayList<ProxyConnectorConfiguration>( config.getProxyConnectors() );
+ new ArrayList<>( config.getProxyConnectors() );
// Remove the old connector list.
config.getProxyConnectors().clear();
@@ -727,7 +727,7 @@ public class DefaultArchivaConfiguration
{
List<String> knowContentConsumers =
- new ArrayList<String>( configuration.getRepositoryScanning().getKnownContentConsumers().size() );
+ new ArrayList<>( configuration.getRepositoryScanning().getKnownContentConsumers().size() );
for ( String knowContentConsumer : configuration.getRepositoryScanning().getKnownContentConsumers() )
{
if ( !dbConsumers.contains( knowContentConsumer ) )
@@ -743,7 +743,7 @@ public class DefaultArchivaConfiguration
if ( !configuration.getRepositoryScanning().getKnownContentConsumers().contains( "create-archiva-metadata" ) )
{
List<String> knowContentConsumers =
- new ArrayList<String>( configuration.getRepositoryScanning().getKnownContentConsumers() );
+ new ArrayList<>( configuration.getRepositoryScanning().getKnownContentConsumers() );
knowContentConsumers.add( "create-archiva-metadata" );
configuration.getRepositoryScanning().setKnownContentConsumers( knowContentConsumers );
}
@@ -752,7 +752,7 @@ public class DefaultArchivaConfiguration
if ( !configuration.getRepositoryScanning().getKnownContentConsumers().contains( "duplicate-artifacts" ) )
{
List<String> knowContentConsumers =
- new ArrayList<String>( configuration.getRepositoryScanning().getKnownContentConsumers() );
+ new ArrayList<>( configuration.getRepositoryScanning().getKnownContentConsumers() );
knowContentConsumers.add( "duplicate-artifacts" );
configuration.getRepositoryScanning().setKnownContentConsumers( knowContentConsumers );
}
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java
index 31f645f7a..7ad6d762c 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java
@@ -226,7 +226,7 @@ public class FileTypes
List<String> patterns = defaultTypeMap.get( filetype.getId() );
if ( patterns == null )
{
- patterns = new ArrayList<String>( filetype.getPatterns().size() );
+ patterns = new ArrayList<>( filetype.getPatterns().size() );
}
patterns.addAll( filetype.getPatterns() );
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java
index 2e23b5afd..9bac5bf28 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java
@@ -40,7 +40,7 @@ public class ProxyConnectorConfigurationOrderComparatorTest
@Test
public void testSortOfAllZeros()
{
- List<ProxyConnectorConfiguration> proxies = new ArrayList<ProxyConnectorConfiguration>();
+ List<ProxyConnectorConfiguration> proxies = new ArrayList<>();
proxies.add( createConnector( "corporate", 0 ) );
proxies.add( createConnector( "snapshots", 0 ) );
@@ -55,7 +55,7 @@ public class ProxyConnectorConfigurationOrderComparatorTest
@Test
public void testSortNormal()
{
- List<ProxyConnectorConfiguration> proxies = new ArrayList<ProxyConnectorConfiguration>();
+ List<ProxyConnectorConfiguration> proxies = new ArrayList<>();
proxies.add( createConnector( "corporate", 3 ) );
proxies.add( createConnector( "snapshots", 1 ) );
@@ -70,7 +70,7 @@ public class ProxyConnectorConfigurationOrderComparatorTest
@Test
public void testSortPartial()
{
- List<ProxyConnectorConfiguration> proxies = new ArrayList<ProxyConnectorConfiguration>();
+ List<ProxyConnectorConfiguration> proxies = new ArrayList<>();
proxies.add( createConnector( "corporate", 3 ) );
proxies.add( createConnector( "snapshots", 0 ) );
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
index da32e74d4..576723147 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
@@ -70,7 +70,7 @@ public class ArtifactMissingChecksumsConsumer
private File repositoryDir;
- private List<String> includes = new ArrayList<String>( 0 );
+ private List<String> includes = new ArrayList<>( 0 );
@Inject
public ArtifactMissingChecksumsConsumer( ArchivaConfiguration configuration, FileTypes filetypes )
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java
index 264d65748..cc8b19d05 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java
@@ -73,7 +73,7 @@ public class AutoRemoveConsumer
private File repositoryDir;
- private List<String> includes = new ArrayList<String>( 0 );
+ private List<String> includes = new ArrayList<>( 0 );
public String getId()
{
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java
index 9ef7b5c6d..d996e1046 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java
@@ -61,7 +61,7 @@ public class AutoRenameConsumer
private File repositoryDir;
- private List<String> includes = new ArrayList<String>( 3 );
+ private List<String> includes = new ArrayList<>( 3 );
private Map<String, String> extensionRenameMap = new HashMap<String, String>();
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java
index 9c13706b4..521a92299 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java
@@ -109,7 +109,7 @@ public class MetadataUpdaterConsumer
private File repositoryDir;
- private List<String> includes = new ArrayList<String>( 0 );
+ private List<String> includes = new ArrayList<>( 0 );
private long scanStartTimestamp = 0;
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java
index 5e1983c3d..69e590c75 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java
@@ -174,8 +174,8 @@ public class ValidateChecksumConsumer
throws PlexusSisuBridgeException
{
checksum = plexusSisuBridge.lookup( ChecksumFile.class );
- List<Digester> allDigesters = new ArrayList<Digester>( digesterUtils.getAllDigesters() );
- includes = new ArrayList<String>( allDigesters.size() );
+ List<Digester> allDigesters = new ArrayList<>( digesterUtils.getAllDigesters() );
+ includes = new ArrayList<>( allDigesters.size() );
for ( Digester digester : allDigesters )
{
includes.add( "**/*" + digester.getFilenameExtension() );
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java
index 86a58445b..f81248297 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java
@@ -112,7 +112,7 @@ public class CleanupReleasedSnapshotsRepositoryPurge
reference.setArtifactId( artifactRef.getArtifactId() );
// Gether the released versions
- List<String> releasedVersions = new ArrayList<String>();
+ List<String> releasedVersions = new ArrayList<>();
List<ManagedRepository> repos = managedRepositoryAdmin.getManagedRepositories();
for ( ManagedRepository repo : repos )
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java
index 7902d6852..5262bff28 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java
@@ -86,7 +86,7 @@ public class DaysOldRepositoryPurge
reference.setArtifactId( artifact.getArtifactId() );
reference.setVersion( artifact.getVersion() );
- List<String> versions = new ArrayList<String>( repository.getVersions( reference ) );
+ List<String> versions = new ArrayList<>( repository.getVersions( reference ) );
Collections.sort( versions, VersionComparator.getInstance() );
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
index 33fd3ee0d..06f872f6a 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
@@ -68,9 +68,6 @@ public class RepositoryPurgeConsumer
*/
private String description = "Purge repository of old snapshots";
- /**
- *
- */
@Inject
@Named( value = "archivaConfiguration#default" )
private ArchivaConfiguration configuration;
@@ -78,27 +75,18 @@ public class RepositoryPurgeConsumer
@Inject
private ManagedRepositoryAdmin managedRepositoryAdmin;
- /**
- *
- */
@Inject
@Named( value = "repositoryContentFactory#default" )
private RepositoryContentFactory repositoryContentFactory;
- /**
- *
- */
@Inject
private MetadataTools metadataTools;
- /**
- *
- */
@Inject
@Named( value = "fileTypes" )
private FileTypes filetypes;
- private List<String> includes = new ArrayList<String>();
+ private List<String> includes = new ArrayList<>();
private RepositoryPurge repoPurge;
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java
index 8636f386a..85deca331 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java
@@ -71,7 +71,7 @@ public class RetentionCountRepositoryPurge
reference.setArtifactId( artifact.getArtifactId() );
reference.setVersion( artifact.getVersion() );
- List<String> versions = new ArrayList<String>( repository.getVersions( reference ) );
+ List<String> versions = new ArrayList<>( repository.getVersions( reference ) );
Collections.sort( versions, VersionComparator.getInstance() );
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java
index 8e1b28669..e5f8b90ab 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java
@@ -76,7 +76,7 @@ public class NexusIndexerConsumer
private NexusIndexer nexusIndexer;
- private List<String> includes = new ArrayList<String>( 0 );
+ private List<String> includes = new ArrayList<>( 0 );
private ManagedRepository repository;
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java
index 12a7d1054..39e5a944c 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java
@@ -62,29 +62,19 @@ public class ArchivaMetadataCreationConsumer
extends AbstractMonitoredConsumer
implements KnownRepositoryContentConsumer, RegistryListener
{
- /**
- * default-value="create-archiva-metadata"
- */
private String id = "create-archiva-metadata";
- /**
- * default-value="Create basic metadata for Archiva to be able to reference the artifact"
- */
private String description = "Create basic metadata for Archiva to be able to reference the artifact";
- /**
- */
@Inject
private ArchivaConfiguration configuration;
- /**
- */
@Inject
private FileTypes filetypes;
private Date whenGathered;
- private List<String> includes = new ArrayList<String>( 0 );
+ private List<String> includes = new ArrayList<>( 0 );
/**
* FIXME: this could be multiple implementations and needs to be configured.
diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java
index 1e9ce7b64..216bc4758 100644
--- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java
+++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java
@@ -101,7 +101,7 @@ public class DefaultLegacyRepositoryConverter
legacyConverterConsumer.setExcludes( fileExclusionPatterns );
legacyConverterConsumer.setDestinationRepository( repository );
- List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>( 1 );
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<>( 1 );
knownConsumers.add( legacyConverterConsumer );
List<InvalidRepositoryContentConsumer> invalidConsumers = Collections.emptyList();
diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
index 8d1d93ebd..cdff8738c 100644
--- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
+++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
@@ -81,7 +81,7 @@ public class LegacyConverterArtifactConsumer
public LegacyConverterArtifactConsumer( PlexusSisuBridge plexusSisuBridge )
throws PlexusSisuBridgeException
{
- includes = new ArrayList<String>( 3 );
+ includes = new ArrayList<>( 3 );
includes.add( "**/*.jar" );
includes.add( "**/*.ear" );
includes.add( "**/*.war" );
diff --git a/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java b/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java
index 3b9e6a917..893b9df29 100644
--- a/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java
+++ b/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/archiva/converter/RepositoryConverterTest.java
@@ -154,7 +154,7 @@ public class RepositoryConverterTest
{
File legacyRepoDir = new File( sourceRepository.getBasedir() );
File destRepoDir = new File( targetRepository.getLocation() );
- List<String> excludes = new ArrayList<String>();
+ List<String> excludes = new ArrayList<>();
repositoryConverter.convertLegacyRepository( legacyRepoDir, destRepoDir, excludes );
}
}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java
index 45b5db0cc..7e2fb57e2 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java
@@ -288,7 +288,7 @@ public class MavenRepositorySearch
private List<IndexingContext> getIndexingContexts( List<String> ids )
{
- List<IndexingContext> contexts = new ArrayList<IndexingContext>( ids.size() );
+ List<IndexingContext> contexts = new ArrayList<>( ids.size() );
for ( String id : ids )
{
@@ -363,7 +363,7 @@ public class MavenRepositorySearch
}
}
- return new ArrayList<String>( indexingContextIds );
+ return new ArrayList<>( indexingContextIds );
}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchFields.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchFields.java
index cd34f701e..fd2353423 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchFields.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchFields.java
@@ -52,7 +52,7 @@ public class SearchFields
/**
* repositories
*/
- private List<String> repositories = new ArrayList<String>();
+ private List<String> repositories = new ArrayList<>();
/**
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java
index 7d61679cc..a493431c8 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java
@@ -42,7 +42,7 @@ public class SearchResultHit
private String repositoryId = "";
- private List<String> versions = new ArrayList<String>();
+ private List<String> versions = new ArrayList<>();
private String packaging;
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResults.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResults.java
index 9ca4ec347..1ea1a53e9 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResults.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResults.java
@@ -59,7 +59,7 @@ public class SearchResults
*/
public List<SearchResultHit> getHits()
{
- return new ArrayList<SearchResultHit>( hits.values() );
+ return new ArrayList<>( hits.values() );
}
/**
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java
index 7ab8375da..83d19380c 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java
@@ -46,7 +46,7 @@ public class MavenRepositorySearchTest
private void createSimpleIndex( boolean scan )
throws Exception
{
- List<File> files = new ArrayList<File>();
+ List<File> files = new ArrayList<>();
files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
+ "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
@@ -60,7 +60,7 @@ public class MavenRepositorySearchTest
private void createIndexContainingMoreArtifacts( boolean scan )
throws Exception
{
- List<File> files = new ArrayList<File>();
+ List<File> files = new ArrayList<>();
files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
+ "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
@@ -82,7 +82,7 @@ public class MavenRepositorySearchTest
private void createIndexContainingMultipleArtifactsSameVersion( boolean scan )
throws Exception
{
- List<File> files = new ArrayList<File>();
+ List<File> files = new ArrayList<>();
files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
+ "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
@@ -188,7 +188,7 @@ public class MavenRepositorySearchTest
{
createIndexContainingMultipleArtifactsSameVersion( false );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
// search artifactId
@@ -218,7 +218,7 @@ public class MavenRepositorySearchTest
{
createIndexContainingMultipleArtifactsSameVersion( true );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
// search artifactId
@@ -255,7 +255,7 @@ public class MavenRepositorySearchTest
{
createSimpleIndex( false );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
EasyMock.expect( archivaConfig.getConfiguration() ).andReturn( config ).times( 1, 2 );
@@ -275,7 +275,7 @@ public class MavenRepositorySearchTest
{
createSimpleIndex( true );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
// page 1
@@ -324,14 +324,14 @@ public class MavenRepositorySearchTest
{
createSimpleIndex( true );
- List<File> files = new ArrayList<File>();
+ List<File> files = new ArrayList<>();
files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_2
+ "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_2
+ "/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar" ) );
createIndex( TEST_REPO_2, files, false );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
selectedRepos.add( TEST_REPO_2 );
@@ -369,7 +369,7 @@ public class MavenRepositorySearchTest
{
createSimpleIndex( false );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
EasyMock.expect( archivaConfig.getConfiguration() ).andReturn( config ).times( 1, 2 );
@@ -388,7 +388,7 @@ public class MavenRepositorySearchTest
public void testNoIndexFound()
throws Exception
{
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
EasyMock.expect( archivaConfig.getConfiguration() ).andReturn( config ).times( 1, 2 );
@@ -406,7 +406,7 @@ public class MavenRepositorySearchTest
public void testRepositoryNotFound()
throws Exception
{
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( "non-existing-repo" );
EasyMock.expect( archivaConfig.getConfiguration() ).andReturn( config ).times( 1, 2 );
@@ -426,10 +426,10 @@ public class MavenRepositorySearchTest
{
createSimpleIndex( true );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
- List<String> previousSearchTerms = new ArrayList<String>();
+ List<String> previousSearchTerms = new ArrayList<>();
previousSearchTerms.add( "archiva-test" );
EasyMock.expect( archivaConfig.getConfiguration() ).andReturn( config ).times( 1, 2 );
@@ -455,14 +455,14 @@ public class MavenRepositorySearchTest
public void testAdvancedSearch()
throws Exception
{
- List<File> files = new ArrayList<File>();
+ List<File> files = new ArrayList<>();
files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_2
+ "/org/apache/archiva/archiva-search/1.0/archiva-search-1.0.jar" ) );
files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_2
+ "/org/apache/archiva/archiva-search/1.1/archiva-search-1.1.jar" ) );
createIndex( TEST_REPO_2, files, false );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_2 );
SearchFields searchFields = new SearchFields();
@@ -493,7 +493,7 @@ public class MavenRepositorySearchTest
{
createIndexContainingMoreArtifacts( false );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
SearchFields searchFields = new SearchFields();
@@ -541,14 +541,14 @@ public class MavenRepositorySearchTest
public void testAdvancedSearchArtifactIdHasNumericChar()
throws Exception
{
- List<File> files = new ArrayList<File>();
+ List<File> files = new ArrayList<>();
files.add( new File( FileUtil.getBasedir(),
"src/test/" + TEST_REPO_1 + "/com/artifactid-numeric/1.0/artifactid-numeric-1.0.jar" ) );
files.add( new File( FileUtil.getBasedir(), "src/test/" + TEST_REPO_1
+ "/com/artifactid-numeric123/1.0/artifactid-numeric123-1.0.jar" ) );
createIndex( TEST_REPO_1, files, true );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
SearchFields searchFields = new SearchFields();
@@ -590,7 +590,7 @@ public class MavenRepositorySearchTest
public void testAdvancedSearchSearchFieldsAreNull()
throws Exception
{
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
SearchFields searchFields = new SearchFields();
@@ -618,7 +618,7 @@ public class MavenRepositorySearchTest
public void testAdvancedSearchSearchFieldsAreBlank()
throws Exception
{
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
SearchFields searchFields = new SearchFields();
@@ -654,7 +654,7 @@ public class MavenRepositorySearchTest
{
createSimpleIndex( true );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
SearchFields searchFields = new SearchFields();
@@ -689,7 +689,7 @@ public class MavenRepositorySearchTest
{
createIndexContainingMoreArtifacts( true );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
SearchFields searchFields = new SearchFields();
@@ -714,7 +714,7 @@ public class MavenRepositorySearchTest
{
createSimpleIndex( true );
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
SearchFields searchFields = new SearchFields();
@@ -768,7 +768,7 @@ public class MavenRepositorySearchTest
public void testAdvancedSearchNoIndexFound()
throws Exception
{
- List<String> selectedRepos = new ArrayList<String>();
+ List<String> selectedRepos = new ArrayList<>();
selectedRepos.add( TEST_REPO_1 );
SearchFields searchFields = new SearchFields();
diff --git a/archiva-modules/archiva-base/archiva-maven2-model/src/main/java/org/apache/archiva/maven2/model/TreeEntry.java b/archiva-modules/archiva-base/archiva-maven2-model/src/main/java/org/apache/archiva/maven2/model/TreeEntry.java
index b122780aa..7a0db88e7 100644
--- a/archiva-modules/archiva-base/archiva-maven2-model/src/main/java/org/apache/archiva/maven2/model/TreeEntry.java
+++ b/archiva-modules/archiva-base/archiva-maven2-model/src/main/java/org/apache/archiva/maven2/model/TreeEntry.java
@@ -34,7 +34,7 @@ public class TreeEntry
implements Serializable
{
- private List<TreeEntry> childs = new ArrayList<TreeEntry>();
+ private List<TreeEntry> childs = new ArrayList<>();
private Artifact artifact;
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaModelCloner.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaModelCloner.java
index 4601de0ca..ac70ecfed 100644
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaModelCloner.java
+++ b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaModelCloner.java
@@ -109,7 +109,7 @@ public class ArchivaModelCloner
return null;
}
- List<ArtifactReference> ret = new ArrayList<ArtifactReference>( artifactReferenceList.size() );
+ List<ArtifactReference> ret = new ArrayList<>( artifactReferenceList.size() );
for ( ArtifactReference ref : artifactReferenceList )
{
@@ -126,7 +126,7 @@ public class ArchivaModelCloner
return null;
}
- List<String> ret = new ArrayList<String>( simple.size() );
+ List<String> ret = new ArrayList<>( simple.size() );
for ( String txt : simple )
{
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/AbstractUpdatePolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/AbstractUpdatePolicy.java
index 19e829f21..2c9b8477a 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/AbstractUpdatePolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/AbstractUpdatePolicy.java
@@ -81,7 +81,7 @@ public abstract class AbstractUpdatePolicy
*/
public static final String ONCE = "once";
- private List<String> options = new ArrayList<String>( 5 );
+ private List<String> options = new ArrayList<>( 5 );
public AbstractUpdatePolicy()
{
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/CachedFailuresPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/CachedFailuresPolicy.java
index bdb45b2e9..6976c45b5 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/CachedFailuresPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/CachedFailuresPolicy.java
@@ -52,13 +52,10 @@ public class CachedFailuresPolicy
*/
public static final String YES = "yes";
- /**
- *
- */
@Inject
private UrlFailureCache urlFailureCache;
- private List<String> options = new ArrayList<String>( 2 );
+ private List<String> options = new ArrayList<>( 2 );
public CachedFailuresPolicy()
{
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ChecksumPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ChecksumPolicy.java
index eff2a37c1..878079e5b 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ChecksumPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ChecksumPolicy.java
@@ -66,7 +66,7 @@ public class ChecksumPolicy
private ChecksumAlgorithm[] algorithms = new ChecksumAlgorithm[]{ ChecksumAlgorithm.SHA1, ChecksumAlgorithm.MD5 };
- private List<String> options = new ArrayList<String>( 3 );
+ private List<String> options = new ArrayList<>( 3 );
public ChecksumPolicy()
{
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsDownloadPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsDownloadPolicy.java
index d4e2341a6..32ac4dffb 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsDownloadPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsDownloadPolicy.java
@@ -54,7 +54,7 @@ public class PropagateErrorsDownloadPolicy
*/
public static final String IGNORE = "ignore";
- private List<String> options = new ArrayList<String>( 3 );
+ private List<String> options = new ArrayList<>( 3 );
public PropagateErrorsDownloadPolicy()
{
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java
index 764118346..6b5c95cb9 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java
@@ -45,7 +45,7 @@ public class PropagateErrorsOnUpdateDownloadPolicy
*/
public static final String NOT_PRESENT = "artifact not already present";
- private List<String> options = new ArrayList<String>( 2 );
+ private List<String> options = new ArrayList<>( 2 );
public PropagateErrorsOnUpdateDownloadPolicy()
{
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java
index ec6e59328..9976eb3a1 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java
@@ -193,7 +193,7 @@ public class DefaultRepositoryProxyConnectors
connector.setDisabled( proxyConfig.isDisabled() );
// Copy any blacklist patterns.
- List<String> blacklist = new ArrayList<String>( 0 );
+ List<String> blacklist = new ArrayList<>( 0 );
if ( CollectionUtils.isNotEmpty( proxyConfig.getBlackListPatterns() ) )
{
blacklist.addAll( proxyConfig.getBlackListPatterns() );
@@ -201,7 +201,7 @@ public class DefaultRepositoryProxyConnectors
connector.setBlacklist( blacklist );
// Copy any whitelist patterns.
- List<String> whitelist = new ArrayList<String>( 0 );
+ List<String> whitelist = new ArrayList<>( 0 );
if ( CollectionUtils.isNotEmpty( proxyConfig.getWhiteListPatterns() ) )
{
whitelist.addAll( proxyConfig.getWhiteListPatterns() );
@@ -236,7 +236,7 @@ public class DefaultRepositoryProxyConnectors
if ( connectors == null )
{
// Create if we are the first.
- connectors = new ArrayList<ProxyConnector>( 1 );
+ connectors = new ArrayList<>( 1 );
}
// Add the connector.
@@ -285,7 +285,7 @@ public class DefaultRepositoryProxyConnectors
List<ProxyConnectorRuleConfiguration> all )
{
List<ProxyConnectorRuleConfiguration> proxyConnectorRuleConfigurations =
- new ArrayList<ProxyConnectorRuleConfiguration>();
+ new ArrayList<>();
for ( ProxyConnectorRuleConfiguration proxyConnectorRuleConfiguration : all )
{
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java
index e3f39d2ec..98c17a9b5 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java
@@ -144,9 +144,9 @@ public abstract class AbstractProxyTestCase
config =
(MockConfiguration) applicationContext.getBean( "archivaConfiguration#mock", ArchivaConfiguration.class );
- config.getConfiguration().setManagedRepositories( new ArrayList<ManagedRepositoryConfiguration>() );
- config.getConfiguration().setRemoteRepositories( new ArrayList<RemoteRepositoryConfiguration>() );
- config.getConfiguration().setProxyConnectors( new ArrayList<ProxyConnectorConfiguration>() );
+ config.getConfiguration().setManagedRepositories( new ArrayList<>() );
+ config.getConfiguration().setRemoteRepositories( new ArrayList<>() );
+ config.getConfiguration().setProxyConnectors( new ArrayList<>() );
// Setup source repository (using default layout)
String name = getClass().getSimpleName();
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java
index ed7f04b48..24624b20f 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java
@@ -186,7 +186,7 @@ public class MetadataTransferTest
String requestedResource = "org/apache/maven/test/get-default-metadata-nonexistant/maven-metadata.xml";
setupTestableManagedRepository( requestedResource );
- config.getConfiguration().setProxyConnectors( new ArrayList<ProxyConnectorConfiguration>( ) );
+ config.getConfiguration().setProxyConnectors( new ArrayList<>( ) );
assertResourceNotFound( requestedResource );
@@ -206,7 +206,7 @@ public class MetadataTransferTest
String requestedResource = "org/apache/maven/test/get-project-metadata/maven-metadata.xml";
setupTestableManagedRepository( requestedResource );
- config.getConfiguration().setProxyConnectors( new ArrayList<ProxyConnectorConfiguration>( ) );
+ config.getConfiguration().setProxyConnectors( new ArrayList<>( ) );
assertResourceExists( requestedResource );
@@ -333,7 +333,7 @@ public class MetadataTransferTest
setupTestableManagedRepository( requestedResource );
- config.getConfiguration().setProxyConnectors( new ArrayList<ProxyConnectorConfiguration>( ) );
+ config.getConfiguration().setProxyConnectors( new ArrayList<>( ) );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
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 )
{
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java
index 656076ecf..43a7048d7 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java
@@ -349,8 +349,8 @@ public class MetadataTools
@PostConstruct
public void initialize()
{
- this.artifactPatterns = new ArrayList<String>();
- this.proxies = new HashMap<String, Set<String>>();
+ this.artifactPatterns = new ArrayList<>();
+ this.proxies = new HashMap<>();
initConfigVariables();
configuration.addChangeListener( this );
@@ -504,7 +504,7 @@ public class MetadataTools
private List<ArchivaRepositoryMetadata> getMetadatasForManagedRepository(
ManagedRepositoryContent managedRepository, String logicalResource )
{
- List<ArchivaRepositoryMetadata> metadatas = new ArrayList<ArchivaRepositoryMetadata>();
+ List<ArchivaRepositoryMetadata> metadatas = new ArrayList<>();
File file = new File( managedRepository.getRepoRoot(), logicalResource );
if ( file.exists() )
{
@@ -622,7 +622,7 @@ public class MetadataTools
else
{
// Add the plugins to the metadata model.
- metadata.setPlugins( new ArrayList<Plugin>( allPlugins ) );
+ metadata.setPlugins( new ArrayList<>( allPlugins ) );
// artifact ID was actually the last part of the group
metadata.setGroupId( metadata.getGroupId() + "." + metadata.getArtifactId() );
@@ -643,12 +643,12 @@ public class MetadataTools
private void updateMetadataVersions( Collection<String> allVersions, ArchivaRepositoryMetadata metadata )
{
// Sort the versions
- List<String> sortedVersions = new ArrayList<String>( allVersions );
+ List<String> sortedVersions = new ArrayList<>( allVersions );
Collections.sort( sortedVersions, VersionComparator.getInstance() );
// Split the versions into released and snapshots.
- List<String> releasedVersions = new ArrayList<String>();
- List<String> snapshotVersions = new ArrayList<String>();
+ List<String> releasedVersions = new ArrayList<>();
+ List<String> snapshotVersions = new ArrayList<>();
for ( String version : sortedVersions )
{
@@ -795,7 +795,7 @@ public class MetadataTools
}
// sort the list to determine to aide in determining the Latest version.
- List<String> sortedVersions = new ArrayList<String>();
+ List<String> sortedVersions = new ArrayList<>();
sortedVersions.addAll( snapshotVersions );
Collections.sort( sortedVersions, new VersionComparator() );
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/RepositoryMetadataMerge.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/RepositoryMetadataMerge.java
index a3ecbf8ca..7f0636033 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/RepositoryMetadataMerge.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/RepositoryMetadataMerge.java
@@ -210,7 +210,7 @@ public class RepositoryMetadataMerge
return null;
}
- List<Plugin> result = new ArrayList<Plugin>();
+ List<Plugin> result = new ArrayList<>();
for (Plugin plugin : plugins)
{
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java
index c9bf80352..d485bd8e3 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java
@@ -99,8 +99,8 @@ public class DefaultRepositoryScanner
// Setup Includes / Excludes.
- List<String> allExcludes = new ArrayList<String>();
- List<String> allIncludes = new ArrayList<String>();
+ List<String> allExcludes = new ArrayList<>();
+ List<String> allIncludes = new ArrayList<>();
if ( CollectionUtils.isNotEmpty( ignoredContentPatterns ) )
{
@@ -147,7 +147,7 @@ public class DefaultRepositoryScanner
private List<String> gatherIds( List<? extends RepositoryContentConsumer> consumers )
{
- List<String> ids = new ArrayList<String>();
+ List<String> ids = new ArrayList<>();
for ( RepositoryContentConsumer consumer : consumers )
{
ids.add( consumer.getId() );
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
index 3ba6a25c4..c45d815dc 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
@@ -164,7 +164,7 @@ public class RepositoryContentConsumers
{
return selectedKnownConsumers;
}
- List<KnownRepositoryContentConsumer> ret = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> ret = new ArrayList<>();
List<String> knownSelected = getSelectedKnownConsumerIds();
@@ -195,7 +195,7 @@ public class RepositoryContentConsumers
return selectedInvalidConsumers;
}
- List<InvalidRepositoryContentConsumer> ret = new ArrayList<InvalidRepositoryContentConsumer>();
+ List<InvalidRepositoryContentConsumer> ret = new ArrayList<>();
List<String> invalidSelected = getSelectedInvalidConsumerIds();
@@ -219,7 +219,7 @@ public class RepositoryContentConsumers
*/
public List<KnownRepositoryContentConsumer> getAvailableKnownConsumers()
{
- return new ArrayList<KnownRepositoryContentConsumer>(
+ return new ArrayList<>(
applicationContext.getBeansOfType( KnownRepositoryContentConsumer.class ).values() );
}
@@ -232,7 +232,7 @@ public class RepositoryContentConsumers
*/
public List<InvalidRepositoryContentConsumer> getAvailableInvalidConsumers()
{
- return new ArrayList<InvalidRepositoryContentConsumer>(
+ return new ArrayList<>(
applicationContext.getBeansOfType( InvalidRepositoryContentConsumer.class ).values() );
}
@@ -261,7 +261,7 @@ public class RepositoryContentConsumers
// - do not create missing/fix invalid checksums and update metadata when deploying from webdav since these are uploaded by maven
if ( !updateRelatedArtifacts )
{
- List<KnownRepositoryContentConsumer> clone = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> clone = new ArrayList<>();
clone.addAll( selectedKnownConsumers );
for ( KnownRepositoryContentConsumer consumer : clone )
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java
index bb88c7195..c75e6e5b3 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java
@@ -42,7 +42,7 @@ public class KnownScanConsumer
{
private int processCount = 0;
- private List<String> includes = new ArrayList<String>();
+ private List<String> includes = new ArrayList<>();
private boolean processUnmodified = false;
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java
index fb5c87181..a19b16db7 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryScannerTest.java
@@ -143,7 +143,7 @@ public class RepositoryScannerTest
private List<String> getIgnoreList()
{
- List<String> ignores = new ArrayList<String>();
+ List<String> ignores = new ArrayList<>();
ignores.addAll( Arrays.asList( RepositoryScanner.IGNORABLE_CONTENT ) );
return ignores;
}
@@ -154,12 +154,12 @@ public class RepositoryScannerTest
{
ManagedRepository repository = createSimpleRepository();
- List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( ARTIFACT_PATTERNS );
knownConsumers.add( consumer );
- List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
@@ -181,12 +181,12 @@ public class RepositoryScannerTest
{
ManagedRepository repository = createSimpleRepository();
- List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( ARTIFACT_PATTERNS );
knownConsumers.add( consumer );
- List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
@@ -207,13 +207,13 @@ public class RepositoryScannerTest
{
ManagedRepository repository = createSimpleRepository();
- List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setProcessUnmodified( true );
consumer.setIncludes( ARTIFACT_PATTERNS );
knownConsumers.add( consumer );
- List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
@@ -234,14 +234,14 @@ public class RepositoryScannerTest
{
ManagedRepository repository = createDefaultRepository();
- List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes(
new String[]{ "**/*.jar", "**/*.war", "**/*.pom", "**/maven-metadata.xml", "**/*-site.xml", "**/*.zip",
"**/*.tar.gz", "**/*.sha1", "**/*.md5" } );
knownConsumers.add( consumer );
- List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
@@ -259,7 +259,7 @@ public class RepositoryScannerTest
public void testDefaultRepositoryArtifactScanner()
throws Exception
{
- List<String> actualArtifactPaths = new ArrayList<String>();
+ List<String> actualArtifactPaths = new ArrayList<>();
actualArtifactPaths.add( "invalid/invalid/1.0-20050611.123456-1/invalid-1.0-20050611.123456-1.jar" );
actualArtifactPaths.add( "invalid/invalid/1.0-SNAPSHOT/invalid-1.0.jar" );
@@ -295,12 +295,12 @@ public class RepositoryScannerTest
ManagedRepository repository = createDefaultRepository();
- List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( ARTIFACT_PATTERNS );
knownConsumers.add( consumer );
- List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
@@ -317,7 +317,7 @@ public class RepositoryScannerTest
public void testDefaultRepositoryMetadataScanner()
throws Exception
{
- List<String> actualMetadataPaths = new ArrayList<String>();
+ List<String> actualMetadataPaths = new ArrayList<>();
actualMetadataPaths.add( "org/apache/maven/some-ejb/1.0/maven-metadata.xml" );
actualMetadataPaths.add( "org/apache/maven/update/test-not-updated/maven-metadata.xml" );
@@ -332,12 +332,12 @@ public class RepositoryScannerTest
ManagedRepository repository = createDefaultRepository();
- List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<>();
KnownScanConsumer knownConsumer = new KnownScanConsumer();
knownConsumer.setIncludes( new String[]{ "**/maven-metadata*.xml" } );
knownConsumers.add( knownConsumer );
- List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
@@ -354,7 +354,7 @@ public class RepositoryScannerTest
public void testDefaultRepositoryProjectScanner()
throws Exception
{
- List<String> actualProjectPaths = new ArrayList<String>();
+ List<String> actualProjectPaths = new ArrayList<>();
actualProjectPaths.add( "org/apache/maven/A/1.0/A-1.0.pom" );
actualProjectPaths.add( "org/apache/maven/B/2.0/B-2.0.pom" );
@@ -369,12 +369,12 @@ public class RepositoryScannerTest
ManagedRepository repository = createDefaultRepository();
- List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( new String[]{ "**/*.pom" } );
knownConsumers.add( consumer );
- List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
@@ -391,7 +391,7 @@ public class RepositoryScannerTest
public void testLegacyRepositoryArtifactScanner()
throws Exception
{
- List<String> actualArtifactPaths = new ArrayList<String>();
+ List<String> actualArtifactPaths = new ArrayList<>();
actualArtifactPaths.add( "invalid/jars/1.0/invalid-1.0.jar" );
actualArtifactPaths.add( "invalid/jars/invalid-1.0.rar" );
@@ -410,12 +410,12 @@ public class RepositoryScannerTest
ManagedRepository repository = createLegacyRepository();
- List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( ARTIFACT_PATTERNS );
knownConsumers.add( consumer );
- List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
diff --git a/archiva-modules/archiva-base/archiva-test-utils/src/main/java/org/apache/archiva/test/utils/ListGenerator.java b/archiva-modules/archiva-base/archiva-test-utils/src/main/java/org/apache/archiva/test/utils/ListGenerator.java
index d0abc42dd..b9a22becc 100644
--- a/archiva-modules/archiva-base/archiva-test-utils/src/main/java/org/apache/archiva/test/utils/ListGenerator.java
+++ b/archiva-modules/archiva-base/archiva-test-utils/src/main/java/org/apache/archiva/test/utils/ListGenerator.java
@@ -58,7 +58,7 @@ public class ListGenerator
return null;
}
- List<FrameworkMethod> generated = new ArrayList<FrameworkMethod>();
+ List<FrameworkMethod> generated = new ArrayList<>();
testRound = Math.min( MAXROUND, testRound );
diff --git a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java
index 7dbe03bf7..73fabc998 100644
--- a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java
+++ b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java
@@ -40,11 +40,11 @@ import java.util.Map;
public abstract class AbstractTransactionEvent
implements TransactionEvent
{
- private Map<File, File> backups = new HashMap<File, File>();
+ private Map<File, File> backups = new HashMap<>();
- private List<File> createdDirs = new ArrayList<File>();
+ private List<File> createdDirs = new ArrayList<>();
- private List<File> createdFiles = new ArrayList<File>();
+ private List<File> createdFiles = new ArrayList<>();
/**
* {@link List}&lt;{@link Digester}&gt;
@@ -75,7 +75,7 @@ public abstract class AbstractTransactionEvent
protected void mkDirs( File dir )
throws IOException
{
- List<File> createDirs = new ArrayList<File>();
+ List<File> createDirs = new ArrayList<>();
File parent = dir;
while ( !parent.exists() || !parent.isDirectory() )
@@ -87,7 +87,7 @@ public abstract class AbstractTransactionEvent
while ( !createDirs.isEmpty() )
{
- File directory = (File) createDirs.remove( createDirs.size() - 1 );
+ File directory = createDirs.remove( createDirs.size() - 1 );
if ( directory.mkdir() )
{
diff --git a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/FileTransaction.java b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/FileTransaction.java
index 35d8b005c..80fab4b32 100644
--- a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/FileTransaction.java
+++ b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/FileTransaction.java
@@ -32,7 +32,7 @@ import org.codehaus.plexus.digest.Digester;
*/
public class FileTransaction
{
- private List<AbstractTransactionEvent> events = new ArrayList<AbstractTransactionEvent>();
+ private List<AbstractTransactionEvent> events = new ArrayList<>();
public void commit()
throws TransactionException