aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src
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-consumers/archiva-lucene-consumers/src
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-consumers/archiva-lucene-consumers/src')
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java11
1 files changed, 7 insertions, 4 deletions
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 4b6f8ca37..070e7b11c 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>();
+ private List<String> includes = new ArrayList<String>( 0 );
private ManagedRepository repository;
@@ -238,11 +238,14 @@ public class NexusIndexerConsumer
private void initIncludes()
{
- includes.clear();
+ List<String> indexable = filetypes.getFileTypePatterns( FileTypes.INDEXABLE_CONTENT );
+ List<String> artifacts = filetypes.getFileTypePatterns( FileTypes.ARTIFACTS );
- includes.addAll( filetypes.getFileTypePatterns( FileTypes.INDEXABLE_CONTENT ) );
+ includes = new ArrayList<String>( indexable.size() + artifacts.size() );
- includes.addAll( filetypes.getFileTypePatterns( FileTypes.ARTIFACTS ) );
+ includes.addAll( indexable );
+
+ includes.addAll( artifacts );
}
@PostConstruct