From e2594ad022035348fb10e5ac32f4d82468af00c4 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 28 Sep 2009 20:43:23 +0000 Subject: [PATCH] add generics. remove unused imports. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@819726 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/artifact/versioning/ManagedVersionMap.java | 10 ++++++---- .../maven/execution/DefaultMavenExecutionResult.java | 2 +- .../apache/maven/plugin/DefaultBuildPluginManager.java | 4 ---- .../settings/validation/SettingsValidationResult.java | 6 +++--- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java b/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java index 9c861e4767..cd843ce14f 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java @@ -23,10 +23,12 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import org.apache.maven.artifact.Artifact; + public class ManagedVersionMap - extends HashMap + extends HashMap { - public ManagedVersionMap( Map map ) + public ManagedVersionMap( Map map ) { super(); if ( map != null ) @@ -38,10 +40,10 @@ public class ManagedVersionMap public String toString() { StringBuilder buffer = new StringBuilder( "ManagedVersionMap (" + size() + " entries)\n" ); - Iterator iter = keySet().iterator(); + Iterator iter = keySet().iterator(); while ( iter.hasNext() ) { - String key = (String) iter.next(); + String key = iter.next(); buffer.append( key ).append( "=" ).append( get( key ) ); if ( iter.hasNext() ) { diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java index bee87ced4a..c5d207da2c 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java @@ -64,7 +64,7 @@ public class DefaultMavenExecutionResult return this; } - public List getTopologicallySortedProjects() + public List getTopologicallySortedProjects() { return topologicallySortedProjects; } diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java index 0f915c2e6c..98c658b3e2 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java @@ -17,11 +17,7 @@ package org.apache.maven.plugin; import java.io.ByteArrayOutputStream; 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.resolver.ArtifactResolutionException; import org.apache.maven.execution.MavenSession; diff --git a/maven-core/src/main/java/org/apache/maven/settings/validation/SettingsValidationResult.java b/maven-core/src/main/java/org/apache/maven/settings/validation/SettingsValidationResult.java index a4cebf96db..7ff484b937 100644 --- a/maven-core/src/main/java/org/apache/maven/settings/validation/SettingsValidationResult.java +++ b/maven-core/src/main/java/org/apache/maven/settings/validation/SettingsValidationResult.java @@ -31,14 +31,14 @@ public final class SettingsValidationResult { private final static String NEWLINE = System.getProperty( "line.separator" ); - private List messages; + private List messages; /** * Default constructor */ public SettingsValidationResult() { - messages = new ArrayList(); + messages = new ArrayList(); } /** @@ -61,7 +61,7 @@ public final class SettingsValidationResult /** * @return */ - public List getMessages() + public List getMessages() { return Collections.unmodifiableList( messages ); }