summaryrefslogtreecommitdiffstats
path: root/archiva-modules
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
parentff99d5a203756c31bcf4a8a98ec4c25cb423ad74 (diff)
downloadarchiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.tar.gz
archiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.zip
use diamond operator
Diffstat (limited to 'archiva-modules')
-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
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java4
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockArchivaAdministration.java4
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockManagedRepositoryAdmin.java2
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java2
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/SearchRequest.java2
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java4
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java22
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultMergeRepositoriesService.java2
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultPluginsServices.java4
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultProxyConnectorService.java4
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java10
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultReportRepositoriesService.java6
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java4
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoryGroupService.java8
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java4
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/AddAdminRepoConsumerClosure.java2
-rw-r--r--archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java2
-rw-r--r--archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java2
-rw-r--r--archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessor.java4
-rw-r--r--archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/RssFeedGeneratorTest.java4
-rw-r--r--archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java2
-rw-r--r--archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java4
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java12
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java4
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java12
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java4
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java4
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java4
97 files changed, 244 insertions, 292 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
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java
index 2b418b809..f9c650719 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java
@@ -100,9 +100,9 @@ public class DefaultRepositoryArchivaTaskScheduler
public static final String CRON_HOURLY = "0 0 * * * ?";
- private Set<String> jobs = new HashSet<String>();
+ private Set<String> jobs = new HashSet<>();
- private List<String> queuedRepos = new ArrayList<String>();
+ private List<String> queuedRepos = new ArrayList<>();
@PostConstruct
public void startup()
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockArchivaAdministration.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockArchivaAdministration.java
index 2cb62ef78..5e4a33104 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockArchivaAdministration.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockArchivaAdministration.java
@@ -108,7 +108,7 @@ public class MockArchivaAdministration
public List<String> getKnownContentConsumers()
throws RepositoryAdminException
{
- return new ArrayList<String>(
+ return new ArrayList<>(
getArchivaConfiguration().getConfiguration().getRepositoryScanning().getKnownContentConsumers() );
}
@@ -133,7 +133,7 @@ public class MockArchivaAdministration
public List<String> getInvalidContentConsumers()
throws RepositoryAdminException
{
- return new ArrayList<String>(
+ return new ArrayList<>(
getArchivaConfiguration().getConfiguration().getRepositoryScanning().getInvalidContentConsumers() );
}
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockManagedRepositoryAdmin.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockManagedRepositoryAdmin.java
index aed2a9510..a8b02b29d 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockManagedRepositoryAdmin.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MockManagedRepositoryAdmin.java
@@ -45,7 +45,7 @@ public class MockManagedRepositoryAdmin
List<ManagedRepositoryConfiguration> managedRepoConfigs =
getArchivaConfiguration().getConfiguration().getManagedRepositories();
- List<ManagedRepository> managedRepos = new ArrayList<ManagedRepository>( managedRepoConfigs.size() );
+ List<ManagedRepository> managedRepos = new ArrayList<>( managedRepoConfigs.size() );
for ( ManagedRepositoryConfiguration repoConfig : managedRepoConfigs )
{
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java
index cf98060e7..ba02a2c2f 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java
@@ -82,7 +82,7 @@ public class TestRepositoryStatisticsManager
List<RepositoryStatistics> stats = repoStats.get( repositoryId );
if ( stats == null )
{
- stats = new ArrayList<RepositoryStatistics>();
+ stats = new ArrayList<>();
repoStats.put( repositoryId, stats );
}
return stats;
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/SearchRequest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/SearchRequest.java
index 209e1ccd2..e38706ca0 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/SearchRequest.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/SearchRequest.java
@@ -62,7 +62,7 @@ public class SearchRequest
/**
* repositories
*/
- private List<String> repositories = new ArrayList<String>();
+ private List<String> repositories = new ArrayList<>();
/**
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java
index c586e3844..c05da22ca 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java
@@ -77,7 +77,7 @@ public abstract class AbstractRestService
protected Logger log = LoggerFactory.getLogger( getClass() );
@Inject
- private List<AuditListener> auditListeners = new ArrayList<AuditListener>();
+ private List<AuditListener> auditListeners = new ArrayList<>();
@Inject
protected UserRepositories userRepositories;
@@ -272,7 +272,7 @@ public abstract class AbstractRestService
{
if ( artifactMetadatas != null && !artifactMetadatas.isEmpty() )
{
- List<Artifact> artifacts = new ArrayList<Artifact>( artifactMetadatas.size() );
+ List<Artifact> artifacts = new ArrayList<>( artifactMetadatas.size() );
for ( ArtifactMetadata artifact : artifactMetadatas )
{
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
index 855d3d67e..df86ba443 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
@@ -144,7 +144,7 @@ public class DefaultBrowseService
repositorySession.close();
}
- List<BrowseResultEntry> browseGroupResultEntries = new ArrayList<BrowseResultEntry>( namespaces.size() );
+ List<BrowseResultEntry> browseGroupResultEntries = new ArrayList<>( namespaces.size() );
for ( String namespace : namespaces )
{
browseGroupResultEntries.add( new BrowseResultEntry( namespace, false ) );
@@ -196,7 +196,7 @@ public class DefaultBrowseService
repositorySession.close();
}
List<BrowseResultEntry> browseGroupResultEntries =
- new ArrayList<BrowseResultEntry>( namespaces.size() + projects.size() );
+ new ArrayList<>( namespaces.size() + projects.size() );
for ( String namespace : namespaces )
{
browseGroupResultEntries.add( new BrowseResultEntry( namespace, false ).groupId( namespace ) );
@@ -219,7 +219,7 @@ public class DefaultBrowseService
try
{
Collection<String> versions = getVersions( selectedRepos, groupId, artifactId );
- return new VersionsList( new ArrayList<String>( versions ) );
+ return new VersionsList( new ArrayList<>( versions ) );
}
catch ( MetadataResolutionException e )
{
@@ -247,7 +247,7 @@ public class DefaultBrowseService
versions.addAll( projectVersions );
}
- List<String> sortedVersions = new ArrayList<String>( versions );
+ List<String> sortedVersions = new ArrayList<>( versions );
Collections.sort( sortedVersions, VersionComparator.getInstance() );
@@ -499,7 +499,7 @@ public class DefaultBrowseService
public List<Artifact> getDependees( String groupId, String artifactId, String version, String repositoryId )
throws ArchivaRestServiceException
{
- List<ProjectVersionReference> references = new ArrayList<ProjectVersionReference>();
+ List<ProjectVersionReference> references = new ArrayList<>();
// TODO: what if we get duplicates across repositories?
RepositorySession repositorySession = repositorySessionFactory.createSession();
try
@@ -523,7 +523,7 @@ public class DefaultBrowseService
repositorySession.close();
}
- List<Artifact> artifacts = new ArrayList<Artifact>( references.size() );
+ List<Artifact> artifacts = new ArrayList<>( references.size() );
for ( ProjectVersionReference projectVersionReference : references )
{
@@ -549,7 +549,7 @@ public class DefaultBrowseService
return Collections.emptyList();
}
Map<String, String> map = metadataFacet.toProperties();
- List<Entry> entries = new ArrayList<Entry>( map.size() );
+ List<Entry> entries = new ArrayList<>( map.size() );
for ( Map.Entry<String, String> entry : map.entrySet() )
{
@@ -711,7 +711,7 @@ public class DefaultBrowseService
{
List<String> selectedRepos = getSelectedRepos( repositoryId );
- List<Artifact> artifactDownloadInfos = new ArrayList<Artifact>();
+ List<Artifact> artifactDownloadInfos = new ArrayList<>();
RepositorySession session = repositorySessionFactory.createSession();
@@ -721,7 +721,7 @@ public class DefaultBrowseService
{
for ( String repoId : selectedRepos )
{
- List<ArtifactMetadata> artifacts = new ArrayList<ArtifactMetadata>(
+ List<ArtifactMetadata> artifacts = new ArrayList<>(
metadataResolver.resolveArtifacts( session, repoId, groupId, artifactId, version ) );
Collections.sort( artifacts, ArtifactMetadataVersionComparator.INSTANCE );
if ( artifacts != null && !artifacts.isEmpty() )
@@ -1037,7 +1037,7 @@ public class DefaultBrowseService
jarFile.close();
}
}
- List<ArtifactContentEntry> sorted = new ArrayList<ArtifactContentEntry>( artifactContentEntryMap.values() );
+ List<ArtifactContentEntry> sorted = new ArrayList<>( artifactContentEntryMap.values() );
Collections.sort( sorted, ArtifactContentEntryComparator.INSTANCE );
return sorted;
}
@@ -1060,7 +1060,7 @@ public class DefaultBrowseService
if ( currentList == null )
{
- currentList = new ArrayList<ArtifactContentEntry>();
+ currentList = new ArrayList<>();
currentList.add( current );
perDepthList.put( current.getDepth(), currentList );
}
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultMergeRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultMergeRepositoriesService.java
index d309c9889..dc187afe9 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultMergeRepositoriesService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultMergeRepositoriesService.java
@@ -197,7 +197,7 @@ public class DefaultMergeRepositoriesService
String sourceRepoId, String repoid )
throws RepositoryMergerException
{
- List<ArtifactMetadata> artifactsWithOutSnapshots = new ArrayList<ArtifactMetadata>();
+ List<ArtifactMetadata> artifactsWithOutSnapshots = new ArrayList<>();
for ( ArtifactMetadata metadata : sourceArtifacts )
{
if ( VersionUtil.isSnapshot( metadata.getProjectVersion() ) )
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultPluginsServices.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultPluginsServices.java
index a7c1c494a..4cab81d47 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultPluginsServices.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultPluginsServices.java
@@ -42,9 +42,9 @@ public class DefaultPluginsServices
implements PluginsService
{
- private List<String> repositoryType = new ArrayList<String>();
+ private List<String> repositoryType = new ArrayList<>();
- private List<String> adminFeatures = new ArrayList<String>();
+ private List<String> adminFeatures = new ArrayList<>();
private ApplicationContext appCont;
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultProxyConnectorService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultProxyConnectorService.java
index aa1a7bdea..fa1861c70 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultProxyConnectorService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultProxyConnectorService.java
@@ -49,7 +49,7 @@ public class DefaultProxyConnectorService
@Inject
public DefaultProxyConnectorService( ApplicationContext applicationContext )
{
- allPolicies = new ArrayList<Policy>( getBeansOfType( applicationContext, Policy.class ).values() );
+ allPolicies = new ArrayList<>( getBeansOfType( applicationContext, Policy.class ).values() );
}
public List<ProxyConnector> getProxyConnectors()
@@ -146,7 +146,7 @@ public class DefaultProxyConnectorService
public List<PolicyInformation> getAllPolicyInformations()
throws ArchivaRestServiceException
{
- List<PolicyInformation> policyInformations = new ArrayList<PolicyInformation>( allPolicies.size() );
+ List<PolicyInformation> policyInformations = new ArrayList<>( allPolicies.size() );
for ( Policy policy : allPolicies )
{
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
index 1b214be22..c47e1d3bb 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
@@ -200,8 +200,7 @@ public class DefaultRedbackRuntimeConfigurationService
return Collections.emptyList();
}
- List<UserManagerImplementationInformation> informations =
- new ArrayList<UserManagerImplementationInformation>( beans.size() );
+ List<UserManagerImplementationInformation> informations = new ArrayList<>( beans.size() );
for ( Map.Entry<String, UserManager> entry : beans.entrySet() )
{
@@ -229,8 +228,7 @@ public class DefaultRedbackRuntimeConfigurationService
return Collections.emptyList();
}
- List<RBACManagerImplementationInformation> informations =
- new ArrayList<RBACManagerImplementationInformation>( beans.size() );
+ List<RBACManagerImplementationInformation> informations = new ArrayList<>( beans.size() );
for ( Map.Entry<String, RBACManager> entry : beans.entrySet() )
{
@@ -314,12 +312,12 @@ public class DefaultRedbackRuntimeConfigurationService
}
catch ( InvalidNameException e )
{
- log.warn( "fail to get ldapConnection: {}", e.getMessage(), e);
+ log.warn( "fail to get ldapConnection: {}", e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(), e );
}
catch ( LdapException e )
{
- log.warn( "fail to get ldapConnection: {}", e.getMessage(), e);
+ log.warn( "fail to get ldapConnection: {}", e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(), e );
}
finally
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultReportRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultReportRepositoriesService.java
index dfdfc433c..08c7c1d13 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultReportRepositoriesService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultReportRepositoriesService.java
@@ -73,7 +73,7 @@ public class DefaultReportRepositoriesService
try
{
MetadataRepository metadataRepository = repositorySession.getRepository();
- List<RepositoryStatistics> stats = new ArrayList<RepositoryStatistics>();
+ List<RepositoryStatistics> stats = new ArrayList<>();
for ( String repo : repositoriesId )
{
try
@@ -140,10 +140,10 @@ public class DefaultReportRepositoriesService
if ( !ALL_REPOSITORIES.equals( repository ) )
{
- observableRepositories = Collections.<String>singletonList( repository );
+ observableRepositories = Collections.singletonList( repository );
}
- List<RepositoryProblemFacet> problemArtifacts = new ArrayList<RepositoryProblemFacet>();
+ List<RepositoryProblemFacet> problemArtifacts = new ArrayList<>();
MetadataRepository metadataRepository = repositorySession.getRepository();
for ( String repoId : observableRepositories )
{
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
index 1f682bc75..c90589ce9 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
@@ -554,7 +554,7 @@ public class DefaultRepositoriesService
boolean fixChecksums, ArtifactTransferRequest artifactTransferRequest )
throws RepositoryMetadataException
{
- List<String> availableVersions = new ArrayList<String>();
+ List<String> availableVersions = new ArrayList<>();
String latestVersion = artifactTransferRequest.getVersion();
File projectDir = new File( targetPath ).getParentFile();
@@ -1123,7 +1123,7 @@ public class DefaultRepositoriesService
Artifact artifact )
throws RepositoryMetadataException
{
- List<String> availableVersions = new ArrayList<String>();
+ List<String> availableVersions = new ArrayList<>();
String latestVersion = "";
if ( metadataFile.exists() )
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoryGroupService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoryGroupService.java
index afabd6676..8269e763e 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoryGroupService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoryGroupService.java
@@ -48,10 +48,10 @@ public class DefaultRepositoryGroupService
try
{
List<RepositoryGroup> repositoriesGroups =
- new ArrayList<RepositoryGroup>( repositoryGroupAdmin.getRepositoriesGroups().size() );
+ new ArrayList<>( repositoryGroupAdmin.getRepositoriesGroups().size() );
for ( org.apache.archiva.admin.model.beans.RepositoryGroup repoGroup : repositoryGroupAdmin.getRepositoriesGroups() )
{
- repositoriesGroups.add( new RepositoryGroup( repoGroup.getId(), new ArrayList<String>(
+ repositoriesGroups.add( new RepositoryGroup( repoGroup.getId(), new ArrayList<>(
repoGroup.getRepositories() ) ).mergedIndexPath( repoGroup.getMergedIndexPath() ).mergedIndexTtl(
repoGroup.getMergedIndexTtl() ).cronExpression( repoGroup.getCronExpression() ) );
}
@@ -82,7 +82,7 @@ public class DefaultRepositoryGroupService
try
{
return repositoryGroupAdmin.addRepositoryGroup(
- new org.apache.archiva.admin.model.beans.RepositoryGroup( repoGroup.getId(), new ArrayList<String>(
+ new org.apache.archiva.admin.model.beans.RepositoryGroup( repoGroup.getId(), new ArrayList<>(
repoGroup.getRepositories() ) ).mergedIndexPath( repoGroup.getMergedIndexPath() ).mergedIndexTtl(
repoGroup.getMergedIndexTtl() ).cronExpression( repoGroup.getCronExpression() ),
getAuditInformation() );
@@ -99,7 +99,7 @@ public class DefaultRepositoryGroupService
try
{
return repositoryGroupAdmin.updateRepositoryGroup(
- new org.apache.archiva.admin.model.beans.RepositoryGroup( repoGroup.getId(), new ArrayList<String>(
+ new org.apache.archiva.admin.model.beans.RepositoryGroup( repoGroup.getId(), new ArrayList<>(
repoGroup.getRepositories() ) ).mergedIndexPath( repoGroup.getMergedIndexPath() ).mergedIndexTtl(
repoGroup.getMergedIndexTtl() ).cronExpression( repoGroup.getCronExpression() ),
getAuditInformation() );
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java
index bc1f2cc57..f17137365 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java
@@ -170,7 +170,7 @@ public class DefaultSearchService
}
try
{
- return new GroupIdList( new ArrayList<String>( repositorySearch.getAllGroupIds( getPrincipal(), repos ) ) );
+ return new GroupIdList( new ArrayList<>( repositorySearch.getAllGroupIds( getPrincipal(), repos ) ) );
}
catch ( RepositorySearchException e )
{
@@ -209,7 +209,7 @@ public class DefaultSearchService
{
return Collections.emptyList();
}
- List<Artifact> artifacts = new ArrayList<Artifact>( searchResults.getReturnedHitsCount() );
+ List<Artifact> artifacts = new ArrayList<>( searchResults.getReturnedHitsCount() );
for ( SearchResultHit hit : searchResults.getHits() )
{
// duplicate Artifact one per available version
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/AddAdminRepoConsumerClosure.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/AddAdminRepoConsumerClosure.java
index 7bd92c0e1..21d329f78 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/AddAdminRepoConsumerClosure.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/AddAdminRepoConsumerClosure.java
@@ -34,7 +34,7 @@ import java.util.List;
public class AddAdminRepoConsumerClosure
implements Closure
{
- private List<AdminRepositoryConsumer> list = new ArrayList<AdminRepositoryConsumer>();
+ private List<AdminRepositoryConsumer> list = new ArrayList<>();
private List<String> selectedIds;
diff --git a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java
index e51ec85dc..e0d337920 100644
--- a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java
+++ b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java
@@ -72,7 +72,7 @@ public class RssFeedGenerator
private List<SyndEntry> getEntries( List<RssFeedEntry> dataEntries )
{
- List<SyndEntry> entries = new ArrayList<SyndEntry>();
+ List<SyndEntry> entries = new ArrayList<>();
SyndEntry entry;
SyndContent description;
diff --git a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java
index 90d983a5f..776274ae7 100644
--- a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java
+++ b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java
@@ -102,7 +102,7 @@ public class NewArtifactsRssFeedProcessor
long tmp = 0;
RssFeedEntry entry = null;
- List<RssFeedEntry> entries = new ArrayList<RssFeedEntry>();
+ List<RssFeedEntry> entries = new ArrayList<>();
String description = "";
int idx = 0;
for ( ArtifactMetadata artifact : artifacts )
diff --git a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessor.java b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessor.java
index a41c0df5c..eb315d296 100644
--- a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessor.java
+++ b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewVersionsOfArtifactRssFeedProcessor.java
@@ -81,7 +81,7 @@ public class NewVersionsOfArtifactRssFeedProcessor
MetadataRepository metadataRepository )
throws FeedException
{
- List<ArtifactMetadata> artifacts = new ArrayList<ArtifactMetadata>();
+ List<ArtifactMetadata> artifacts = new ArrayList<>();
try
{
for ( String repoId : metadataRepository.getRepositories() )
@@ -106,7 +106,7 @@ public class NewVersionsOfArtifactRssFeedProcessor
long tmp = 0;
RssFeedEntry entry = null;
- List<RssFeedEntry> entries = new ArrayList<RssFeedEntry>();
+ List<RssFeedEntry> entries = new ArrayList<>();
String description = "";
int idx = 0;
for ( ArtifactMetadata artifact : artifacts )
diff --git a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/RssFeedGeneratorTest.java b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/RssFeedGeneratorTest.java
index c011fb894..40cab4f52 100644
--- a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/RssFeedGeneratorTest.java
+++ b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/RssFeedGeneratorTest.java
@@ -57,7 +57,7 @@ public class RssFeedGeneratorTest
public void testNewFeed()
throws Exception
{
- List<RssFeedEntry> entries = new ArrayList<RssFeedEntry>();
+ List<RssFeedEntry> entries = new ArrayList<>();
RssFeedEntry entry = new RssFeedEntry( "Item 1" );
Date whenGathered = new Date( System.currentTimeMillis() );
@@ -95,7 +95,7 @@ public class RssFeedGeneratorTest
public void testNoDataEntries()
throws Exception
{
- List<RssFeedEntry> entries = new ArrayList<RssFeedEntry>();
+ List<RssFeedEntry> entries = new ArrayList<>();
SyndFeed feed =
generator.generateFeed( "Test Feed", "The test feed from Archiva.", entries );
diff --git a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
index a83f38301..ad06d3dd6 100644
--- a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
+++ b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
@@ -72,7 +72,7 @@ public class NewArtifactsRssFeedProcessorTest
public void testProcess()
throws Exception
{
- List<ArtifactMetadata> newArtifacts = new ArrayList<ArtifactMetadata>();
+ List<ArtifactMetadata> newArtifacts = new ArrayList<>();
Date whenGathered = Calendar.getInstance().getTime();
newArtifacts.add( createArtifact( "artifact-one", "1.0", whenGathered ) );
diff --git a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java
index d266b528c..cb13c7e41 100644
--- a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java
+++ b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java
@@ -81,7 +81,7 @@ public class DefaultUserRepositories
{
List<ManagedRepository> managedRepositories = getAccessibleRepositories( principal, operation );
- List<String> repoIds = new ArrayList<String>( managedRepositories.size() );
+ List<String> repoIds = new ArrayList<>( managedRepositories.size() );
for ( ManagedRepository managedRepository : managedRepositories )
{
repoIds.add( managedRepository.getId() );
@@ -101,7 +101,7 @@ public class DefaultUserRepositories
{
SecuritySession securitySession = createSession( principal );
- List<ManagedRepository> managedRepositories = new ArrayList<ManagedRepository>();
+ List<ManagedRepository> managedRepositories = new ArrayList<>();
try
{
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
index 59c352b25..936e1598f 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
@@ -604,7 +604,7 @@ public class DefaultFileUploadService
String artifactId, String version, String packaging )
throws RepositoryMetadataException
{
- List<String> availableVersions = new ArrayList<String>();
+ List<String> availableVersions = new ArrayList<>();
String latestVersion = version;
File projectDir = new File( targetPath ).getParentFile();
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java
index e822c6b1d..cc9ae88db 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java
@@ -240,7 +240,7 @@ public class RssFeedServlet
UnauthorizedException
{
String auth = req.getHeader( "Authorization" );
- List<String> repoIds = new ArrayList<String>();
+ List<String> repoIds = new ArrayList<>();
if ( repositoryId != null )
{
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
index 652b5d088..d2aae47ba 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
@@ -259,7 +259,7 @@ public class ArchivaConfigurableUsersManager
public List<User> findUsersByEmailKey( String emailKey, boolean orderAscending )
throws UserManagerException
{
- List<User> users = new ArrayList<User>();
+ List<User> users = new ArrayList<>();
for ( UserManager userManager : userManagerPerId.values() )
{
@@ -275,7 +275,7 @@ public class ArchivaConfigurableUsersManager
public List<User> findUsersByFullNameKey( String fullNameKey, boolean orderAscending )
throws UserManagerException
{
- List<User> users = new ArrayList<User>();
+ List<User> users = new ArrayList<>();
for ( UserManager userManager : userManagerPerId.values() )
{
@@ -291,7 +291,7 @@ public class ArchivaConfigurableUsersManager
public List<User> findUsersByQuery( UserQuery query )
throws UserManagerException
{
- List<User> users = new ArrayList<User>();
+ List<User> users = new ArrayList<>();
for ( UserManager userManager : userManagerPerId.values() )
{
@@ -307,7 +307,7 @@ public class ArchivaConfigurableUsersManager
public List<User> findUsersByUsernameKey( String usernameKey, boolean orderAscending )
throws UserManagerException
{
- List<User> users = new ArrayList<User>();
+ List<User> users = new ArrayList<>();
for ( UserManager userManager : userManagerPerId.values() )
{
@@ -328,7 +328,7 @@ public class ArchivaConfigurableUsersManager
public List<User> getUsers()
throws UserManagerException
{
- List<User> users = new ArrayList<User>();
+ List<User> users = new ArrayList<>();
for ( UserManager userManager : userManagerPerId.values() )
{
@@ -344,7 +344,7 @@ public class ArchivaConfigurableUsersManager
public List<User> getUsers( boolean orderAscending )
throws UserManagerException
{
- List<User> users = new ArrayList<User>();
+ List<User> users = new ArrayList<>();
for ( UserManager userManager : userManagerPerId.values() )
{
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java
index 0cf358328..ec129a515 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLdapRoleMapperConfiguration.java
@@ -155,7 +155,7 @@ public class ArchivaLdapRoleMapperConfiguration
RedbackRuntimeConfiguration redbackRuntimeConfiguration =
redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration();
- List<LdapGroupMapping> ldapGroupMappings = new ArrayList<LdapGroupMapping>( mappings.size() );
+ List<LdapGroupMapping> ldapGroupMappings = new ArrayList<>( mappings.size() );
for ( Map.Entry<String, List<String>> entry : mappings.entrySet() )
{
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java
index a6090cec1..2b14fe227 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java
@@ -75,7 +75,7 @@ public class ArchivaLockedAdminEnvironmentCheck
List<String> userManagerImpls =
redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration().getUserManagerImpls();
- userManagers = new ArrayList<UserManager>( userManagerImpls.size() );
+ userManagers = new ArrayList<>( userManagerImpls.size() );
for ( String beanId : userManagerImpls )
{
@@ -100,7 +100,7 @@ public class ArchivaLockedAdminEnvironmentCheck
{
continue;
}
- List<String> roles = new ArrayList<String>();
+ List<String> roles = new ArrayList<>();
roles.add( RedbackRoleConstants.SYSTEM_ADMINISTRATOR_ROLE );
List<UserAssignment> systemAdminstrators;
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
index 7320d5a99..c511b0274 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
@@ -250,7 +250,7 @@ public class ArchivaRbacManager
throw new RbacManagerException( lastException.getMessage(), lastException );
}
- return new ArrayList<Role>( allRoles.values() );
+ return new ArrayList<>( allRoles.values() );
}
public void removeRole( Role role )
@@ -381,7 +381,7 @@ public class ArchivaRbacManager
{
throw new RbacManagerException( lastException.getMessage(), lastException );
}
- return new ArrayList<Permission>( allPermissions.values() );
+ return new ArrayList<>( allPermissions.values() );
}
public void removePermission( Permission permission )
@@ -505,7 +505,7 @@ public class ArchivaRbacManager
{
throw new RbacManagerException( lastException.getMessage(), lastException );
}
- return new ArrayList<Operation>( allOperations.values() );
+ return new ArrayList<>( allOperations.values() );
}
public void removeOperation( Operation operation )
@@ -629,7 +629,7 @@ public class ArchivaRbacManager
{
throw new RbacManagerException( lastException.getMessage(), lastException );
}
- return new ArrayList<Resource>( allResources.values() );
+ return new ArrayList<>( allResources.values() );
}
public void removeResource( Resource resource )
@@ -820,13 +820,13 @@ public class ArchivaRbacManager
{
throw new RbacManagerException( lastException.getMessage(), lastException );
}
- return new ArrayList<UserAssignment>( allUserAssignments.values() );
+ return new ArrayList<>( allUserAssignments.values() );
}
public List<UserAssignment> getUserAssignmentsForRoles( Collection<String> roleNames )
throws RbacManagerException
{
- List<UserAssignment> allUserAssignments = new ArrayList<UserAssignment>();
+ List<UserAssignment> allUserAssignments = new ArrayList<>();
boolean allFailed = true;
Exception lastException = null;
for ( RBACManager rbacManager : rbacManagersPerId.values() )
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
index e54a503b0..4707c322e 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
@@ -78,7 +78,7 @@ public class ArchivaUserManagerAuthenticator
List<String> userManagerImpls =
redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration().getUserManagerImpls();
- userManagers = new ArrayList<UserManager>( userManagerImpls.size() );
+ userManagers = new ArrayList<>( userManagerImpls.size() );
for ( String beanId : userManagerImpls )
{
@@ -99,7 +99,7 @@ public class ArchivaUserManagerAuthenticator
String username = null;
Exception resultException = null;
PasswordBasedAuthenticationDataSource source = (PasswordBasedAuthenticationDataSource) ds;
- List<AuthenticationFailureCause> authnResultErrors = new ArrayList<AuthenticationFailureCause>();
+ List<AuthenticationFailureCause> authnResultErrors = new ArrayList<>();
for ( UserManager userManager : userManagers )
{
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java
index 3f4c20909..7d7ac0b75 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java
@@ -181,12 +181,12 @@ public class SecuritySynchronization
stopWatch.reset();
stopWatch.start();
- List<String> violations = new ArrayList<String>();
+ List<String> violations = new ArrayList<>();
for ( Entry<String, EnvironmentCheck> entry : checkers.entrySet() )
{
EnvironmentCheck check = entry.getValue();
- List<String> v = new ArrayList<String>();
+ List<String> v = new ArrayList<>();
check.validateEnvironment( v );
log.info( "Environment Check: {} -> {} violation(s)", entry.getKey(), v.size() );
for ( String s : v )
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
index 03dd1d229..2e35ba670 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
@@ -294,7 +294,7 @@ public abstract class AbstractDownloadTest
{
try
{
- List<String> entriesNames = new ArrayList<String>();
+ List<String> entriesNames = new ArrayList<>();
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while ( entries.hasMoreElements() )
{
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java
index f38a0d6a6..e9e717d4c 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java
@@ -52,7 +52,7 @@ public class SecuritySystemStub
{
Map<String, String> users = new HashMap<String, String>();
- List<String> repoIds = new ArrayList<String>();
+ List<String> repoIds = new ArrayList<>();
public SecuritySystemStub()
{
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java
index 8f9fc13bd..940fa6e15 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java
@@ -40,9 +40,9 @@ public class TestMetadataRepository
private static final String TEST_NAMESPACE = "org.apache.archiva";
- private List<ArtifactMetadata> artifacts = new ArrayList<ArtifactMetadata>();
+ private List<ArtifactMetadata> artifacts = new ArrayList<>();
- private List<String> versions = new ArrayList<String>();
+ private List<String> versions = new ArrayList<>();
public TestMetadataRepository()
{