add generics.

remove unused imports.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@819726 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2009-09-28 20:43:23 +00:00
parent 9bc16f0dc1
commit e2594ad022
4 changed files with 10 additions and 12 deletions

View File

@ -23,10 +23,12 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import org.apache.maven.artifact.Artifact;
public class ManagedVersionMap public class ManagedVersionMap
extends HashMap extends HashMap<String, Artifact>
{ {
public ManagedVersionMap( Map map ) public ManagedVersionMap( Map<String, Artifact> map )
{ {
super(); super();
if ( map != null ) if ( map != null )
@ -38,10 +40,10 @@ public class ManagedVersionMap
public String toString() public String toString()
{ {
StringBuilder buffer = new StringBuilder( "ManagedVersionMap (" + size() + " entries)\n" ); StringBuilder buffer = new StringBuilder( "ManagedVersionMap (" + size() + " entries)\n" );
Iterator iter = keySet().iterator(); Iterator<String> iter = keySet().iterator();
while ( iter.hasNext() ) while ( iter.hasNext() )
{ {
String key = (String) iter.next(); String key = iter.next();
buffer.append( key ).append( "=" ).append( get( key ) ); buffer.append( key ).append( "=" ).append( get( key ) );
if ( iter.hasNext() ) if ( iter.hasNext() )
{ {

View File

@ -64,7 +64,7 @@ public class DefaultMavenExecutionResult
return this; return this;
} }
public List getTopologicallySortedProjects() public List<MavenProject> getTopologicallySortedProjects()
{ {
return topologicallySortedProjects; return topologicallySortedProjects;
} }

View File

@ -17,11 +17,7 @@ package org.apache.maven.plugin;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.PrintStream; import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.RepositoryRequest; import org.apache.maven.artifact.repository.RepositoryRequest;
import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.MavenSession;

View File

@ -31,14 +31,14 @@ public final class SettingsValidationResult
{ {
private final static String NEWLINE = System.getProperty( "line.separator" ); private final static String NEWLINE = System.getProperty( "line.separator" );
private List messages; private List<String> messages;
/** /**
* Default constructor * Default constructor
*/ */
public SettingsValidationResult() public SettingsValidationResult()
{ {
messages = new ArrayList(); messages = new ArrayList<String>();
} }
/** /**
@ -61,7 +61,7 @@ public final class SettingsValidationResult
/** /**
* @return * @return
*/ */
public List getMessages() public List<String> getMessages()
{ {
return Collections.unmodifiableList( messages ); return Collections.unmodifiableList( messages );
} }