aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-cli
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-cli
parentff99d5a203756c31bcf4a8a98ec4c25cb423ad74 (diff)
downloadarchiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.tar.gz
archiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.zip
use diamond operator
Diffstat (limited to 'archiva-cli')
-rw-r--r--archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java15
-rw-r--r--archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java2
2 files changed, 8 insertions, 9 deletions
diff --git a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java
index a65049597..73662e6b5 100644
--- a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java
+++ b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java
@@ -24,17 +24,16 @@ import com.sampullara.cli.Argument;
import org.apache.archiva.admin.model.beans.ManagedRepository;
import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException;
+import org.apache.archiva.consumers.ConsumerException;
+import org.apache.archiva.consumers.InvalidRepositoryContentConsumer;
+import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
+import org.apache.archiva.consumers.RepositoryContentConsumer;
import org.apache.archiva.converter.RepositoryConversionException;
import org.apache.archiva.converter.legacy.LegacyRepositoryConverter;
import org.apache.archiva.repository.scanner.RepositoryScanStatistics;
import org.apache.archiva.repository.scanner.RepositoryScanner;
import org.apache.archiva.repository.scanner.RepositoryScannerException;
-import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
-import org.apache.archiva.consumers.ConsumerException;
-import org.apache.archiva.consumers.InvalidRepositoryContentConsumer;
-import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
-import org.apache.archiva.consumers.RepositoryContentConsumer;
import org.apache.maven.artifact.manager.WagonManager;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -167,13 +166,13 @@ public class ArchivaCli
repo.setName( "Archiva CLI Provided Repo" );
repo.setLocation( path );
- List<KnownRepositoryContentConsumer> knownConsumerList = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> knownConsumerList = new ArrayList<>();
knownConsumerList.addAll( getConsumerList( consumers ) );
List<InvalidRepositoryContentConsumer> invalidConsumerList = Collections.emptyList();
- List<String> ignoredContent = new ArrayList<String>();
+ List<String> ignoredContent = new ArrayList<>();
ignoredContent.addAll( Arrays.asList( RepositoryScanner.IGNORABLE_CONTENT ) );
RepositoryScanner scanner = lookup( RepositoryScanner.class );
@@ -201,7 +200,7 @@ public class ArchivaCli
private List<KnownRepositoryContentConsumer> getConsumerList( String[] consumers )
throws ConsumerException, PlexusSisuBridgeException
{
- List<KnownRepositoryContentConsumer> consumerList = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> consumerList = new ArrayList<>();
Map<String, KnownRepositoryContentConsumer> availableConsumers = getConsumers();
diff --git a/archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java b/archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java
index a0404edbc..7efde1622 100644
--- a/archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java
+++ b/archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java
@@ -52,7 +52,7 @@ public class ArtifactCountConsumer
public ArtifactCountConsumer()
{
// TODO: shouldn't this use filetypes?
- includes = new ArrayList<String>();
+ includes = new ArrayList<>();
includes.add( "**/*.pom" );
includes.add( "**/*.jar" );
includes.add( "**/*.war" );