o Generified code

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@796637 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-07-22 09:21:11 +00:00
parent 3d9dea68d9
commit ddd5c13075
4 changed files with 16 additions and 15 deletions

View File

@ -63,7 +63,7 @@ public class AbstractArtifactResolutionException
String type,
String classifier,
List<ArtifactRepository> remoteRepositories,
List path )
List<String> path )
{
this( message, groupId, artifactId, version, type, classifier, remoteRepositories, path, null );
}
@ -75,7 +75,7 @@ public class AbstractArtifactResolutionException
String type,
String classifier,
List<ArtifactRepository> remoteRepositories,
List path,
List<String> path,
Throwable t )
{
super( constructMessageBase( message, groupId, artifactId, version, type, remoteRepositories, path ), t );
@ -150,7 +150,7 @@ public class AbstractArtifactResolutionException
return this.path;
}
public List getRemoteRepositories()
public List<ArtifactRepository> getRemoteRepositories()
{
return remoteRepositories;
}
@ -160,7 +160,7 @@ public class AbstractArtifactResolutionException
return originalMessage;
}
protected static String constructArtifactPath( List path,
protected static String constructArtifactPath( List<String> path,
String indentation )
{
StringBuilder sb = new StringBuilder();
@ -172,7 +172,7 @@ public class AbstractArtifactResolutionException
sb.append( "Path to dependency: " );
sb.append( LS );
int num = 1;
for ( Iterator i = path.iterator(); i.hasNext(); num++ )
for ( Iterator<String> i = path.iterator(); i.hasNext(); num++ )
{
sb.append( indentation );
sb.append( "\t" );
@ -191,8 +191,8 @@ public class AbstractArtifactResolutionException
String artifactId,
String version,
String type,
List remoteRepositories,
List path )
List<ArtifactRepository> remoteRepositories,
List<String> path )
{
StringBuilder sb = new StringBuilder();
@ -206,9 +206,9 @@ public class AbstractArtifactResolutionException
sb.append( "from the specified remote repositories:" );
sb.append( LS + " " );
for ( Iterator i = new HashSet( remoteRepositories ).iterator(); i.hasNext(); )
for ( Iterator<ArtifactRepository> i = new HashSet<ArtifactRepository>( remoteRepositories ).iterator(); i.hasNext(); )
{
ArtifactRepository remoteRepository = (ArtifactRepository) i.next();
ArtifactRepository remoteRepository = i.next();
sb.append( remoteRepository.getId() );
sb.append( " (" );
@ -247,7 +247,7 @@ public class AbstractArtifactResolutionException
String type,
String classifier,
String downloadUrl,
List path )
List<String> path )
{
StringBuilder sb = new StringBuilder( message );

View File

@ -47,7 +47,7 @@ public class ArtifactNotFoundException
}
public ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type, String classifier, List<ArtifactRepository> remoteRepositories,
String downloadUrl, List path, ResourceDoesNotExistException cause )
String downloadUrl, List<String> path, ResourceDoesNotExistException cause )
{
super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, classifier, downloadUrl, path ), groupId, artifactId, version, type, classifier, remoteRepositories,
null, cause );
@ -56,7 +56,7 @@ public class ArtifactNotFoundException
}
private ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type, String classifier, List<ArtifactRepository> remoteRepositories,
String downloadUrl, List path )
String downloadUrl, List<String> path )
{
super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, classifier, downloadUrl, path ), groupId, artifactId, version, type, classifier, remoteRepositories,
null );

View File

@ -31,8 +31,9 @@ import org.apache.maven.wagon.TransferFailedException;
public class ArtifactResolutionException
extends AbstractArtifactResolutionException
{
public ArtifactResolutionException( String message, String groupId, String artifactId, String version, String type, String classifier, List<ArtifactRepository> remoteRepositories, List path,
Throwable t )
public ArtifactResolutionException( String message, String groupId, String artifactId, String version, String type,
String classifier, List<ArtifactRepository> remoteRepositories,
List<String> path, Throwable t )
{
super( message, groupId, artifactId, version, type, classifier, remoteRepositories, path, t );
}

View File

@ -59,7 +59,7 @@ class DefaultModelBuildingListener
{
throw new IllegalArgumentException( "project building request missing" );
}
this.projectBuildingRequest = projectBuildingRequest;
this.projectBuildingRequest = projectBuildingRequest;
this.remoteRepositories = projectBuildingRequest.getRemoteRepositories();
this.pluginRepositories = projectBuildingRequest.getPluginArtifactRepositories();
}