summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-proxy/src
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-04-10 11:43:11 +1000
committerOlivier Lamy <olamy@apache.org>2014-04-10 11:43:11 +1000
commitd9de8dc7afe4a1e22257a9437d68649eee8f3047 (patch)
tree89e49278beea7304252fd217a35a865986647a44 /archiva-modules/archiva-base/archiva-proxy/src
parentff99d5a203756c31bcf4a8a98ec4c25cb423ad74 (diff)
downloadarchiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.tar.gz
archiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.zip
use diamond operator
Diffstat (limited to 'archiva-modules/archiva-base/archiva-proxy/src')
-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
3 files changed, 10 insertions, 10 deletions
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 );