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

View File

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