aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-converter
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-01-09 12:44:02 +0000
committerOlivier Lamy <olamy@apache.org>2012-01-09 12:44:02 +0000
commit717cbf7c8aa9bdacf632bad57ef6788afe565989 (patch)
treec4a15f1030f0606aa05c791519bb54d11e48f299 /archiva-modules/archiva-base/archiva-converter
parent8e2309ee394485d276bef07a08761feb43cf46f1 (diff)
downloadarchiva-717cbf7c8aa9bdacf632bad57ef6788afe565989.tar.gz
archiva-717cbf7c8aa9bdacf632bad57ef6788afe565989.zip
take care of some ArrayList size init
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1229118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-converter')
-rw-r--r--archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java11
-rw-r--r--archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java2
2 files changed, 6 insertions, 7 deletions
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 26a817a48..b4644d224 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
@@ -22,12 +22,12 @@ package org.apache.archiva.converter.legacy;
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.converter.RepositoryConversionException;
-import org.apache.archiva.repository.scanner.RepositoryScanner;
-import org.apache.archiva.repository.scanner.RepositoryScannerException;
import org.apache.archiva.common.utils.PathUtil;
import org.apache.archiva.consumers.InvalidRepositoryContentConsumer;
import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
+import org.apache.archiva.converter.RepositoryConversionException;
+import org.apache.archiva.repository.scanner.RepositoryScanner;
+import org.apache.archiva.repository.scanner.RepositoryScannerException;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
@@ -101,12 +101,11 @@ public class DefaultLegacyRepositoryConverter
legacyConverterConsumer.setExcludes( fileExclusionPatterns );
legacyConverterConsumer.setDestinationRepository( repository );
- List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>( 1 );
knownConsumers.add( legacyConverterConsumer );
List<InvalidRepositoryContentConsumer> invalidConsumers = Collections.emptyList();
- List<String> ignoredContent = new ArrayList<String>();
- ignoredContent.addAll( Arrays.asList( RepositoryScanner.IGNORABLE_CONTENT ) );
+ List<String> ignoredContent = new ArrayList<String>( Arrays.asList( RepositoryScanner.IGNORABLE_CONTENT ) );
repoScanner.scan( legacyRepository, knownConsumers, invalidConsumers, ignoredContent,
RepositoryScanner.FRESH_SCAN );
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 ad8366523..7d0ce6b54 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>();
+ includes = new ArrayList<String>( 3 );
includes.add( "**/*.jar" );
includes.add( "**/*.ear" );
includes.add( "**/*.war" );