diff options
author | Brett Porter <brett@apache.org> | 2009-03-17 13:46:17 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2009-03-17 13:46:17 +0000 |
commit | 2846805437e35d255d876339abf03ee3aa378017 (patch) | |
tree | 1908b7624c935f20c8d8de116bf917fa742f8c7d /archiva-modules/archiva-base/archiva-converter/src | |
parent | 41854b9e2fdecb1300e496f4afcdf03d47c93056 (diff) | |
download | archiva-2846805437e35d255d876339abf03ee3aa378017.tar.gz archiva-2846805437e35d255d876339abf03ee3aa378017.zip |
clean up warnings in archiva-converter
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@755243 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-converter/src')
4 files changed, 20 insertions, 30 deletions
diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java index 4bb78efa1..1831fd1ae 100644 --- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java +++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java @@ -21,6 +21,8 @@ package org.apache.maven.archiva.converter.legacy; import org.apache.maven.archiva.common.utils.PathUtil; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer; +import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer; import org.apache.maven.archiva.converter.RepositoryConversionException; import org.apache.maven.archiva.repository.RepositoryException; import org.apache.maven.archiva.repository.scanner.RepositoryScanner; @@ -65,7 +67,7 @@ public class DefaultLegacyRepositoryConverter private RepositoryScanner repoScanner; public void convertLegacyRepository( File legacyRepositoryDirectory, File repositoryDirectory, - List fileExclusionPatterns ) + List<String> fileExclusionPatterns ) throws RepositoryConversionException { try @@ -85,11 +87,11 @@ public class DefaultLegacyRepositoryConverter legacyConverterConsumer.setExcludes( fileExclusionPatterns ); legacyConverterConsumer.setDestinationRepository( repository ); - List knownConsumers = new ArrayList(); + List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>(); knownConsumers.add( legacyConverterConsumer ); - List invalidConsumers = Collections.EMPTY_LIST; - List ignoredContent = new ArrayList(); + List<InvalidRepositoryContentConsumer> invalidConsumers = Collections.emptyList(); + List<String> ignoredContent = new ArrayList<String>(); ignoredContent.addAll( Arrays.asList( RepositoryScanner.IGNORABLE_CONTENT ) ); repoScanner.scan( legacyRepository, knownConsumers, invalidConsumers, ignoredContent, diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java index 331f7784f..0cd5bc3b2 100644 --- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java +++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java @@ -69,13 +69,13 @@ public class LegacyConverterArtifactConsumer private ArtifactRepository destinationRepository; - private List includes; + private List<String> includes; - private List excludes; + private List<String> excludes; public LegacyConverterArtifactConsumer() { - includes = new ArrayList(); + includes = new ArrayList<String>(); includes.add( "**/*.jar" ); includes.add( "**/*.ear" ); includes.add( "**/*.war" ); @@ -93,12 +93,12 @@ public class LegacyConverterArtifactConsumer } - public List getExcludes() + public List<String> getExcludes() { return excludes; } - public List getIncludes() + public List<String> getIncludes() { return includes; } @@ -139,12 +139,12 @@ public class LegacyConverterArtifactConsumer return false; } - public void setExcludes( List excludes ) + public void setExcludes( List<String> excludes ) { this.excludes = excludes; } - public void setIncludes( List includes ) + public void setIncludes( List<String> includes ) { this.includes = includes; } diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyRepositoryConverter.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyRepositoryConverter.java index 7dad5bf62..53db2980f 100644 --- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyRepositoryConverter.java +++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyRepositoryConverter.java @@ -42,6 +42,6 @@ public interface LegacyRepositoryConverter * @throws RepositoryConversionException */ void convertLegacyRepository( File legacyRepositoryDirectory, File destinationRepositoryDirectory, - List fileExclusionPatterns ) + List<String> fileExclusionPatterns ) throws RepositoryConversionException; } diff --git a/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/maven/archiva/converter/RepositoryConverterTest.java b/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/maven/archiva/converter/RepositoryConverterTest.java index 763ba556b..e8da73550 100644 --- a/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/maven/archiva/converter/RepositoryConverterTest.java +++ b/archiva-modules/archiva-base/archiva-converter/src/test/java/org/apache/maven/archiva/converter/RepositoryConverterTest.java @@ -19,21 +19,19 @@ package org.apache.maven.archiva.converter; * under the License. */ +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + import org.apache.commons.io.FileUtils; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.converter.legacy.LegacyRepositoryConverter; -import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; -import org.codehaus.plexus.i18n.I18N; import org.codehaus.plexus.spring.PlexusInSpringTestCase; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - /** * Test the repository converter. * @@ -51,12 +49,6 @@ public class RepositoryConverterTest private LegacyRepositoryConverter repositoryConverter; - private ArtifactFactory artifactFactory; - - private static final int SLEEP_MILLIS = 100; - - private I18N i18n; - protected void setUp() throws Exception { @@ -82,10 +74,6 @@ public class RepositoryConverterTest targetRepository.setLayout( "default" ); repositoryConverter = (LegacyRepositoryConverter) lookup( LegacyRepositoryConverter.ROLE, "default" ); - - artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE ); - - i18n = (I18N) lookup( I18N.ROLE ); } protected void tearDown() @@ -146,7 +134,7 @@ public class RepositoryConverterTest { File legacyRepoDir = new File( sourceRepository.getBasedir() ); File destRepoDir = new File( targetRepository.getLocation() ); - List excludes = new ArrayList(); + List<String> excludes = new ArrayList<String>(); repositoryConverter.convertLegacyRepository( legacyRepoDir, destRepoDir, excludes ); } } |