From 6215e507a52469ae3bbf9cd96d6fbd22bfa4cc62 Mon Sep 17 00:00:00 2001 From: Herve Boutemy Date: Fri, 28 Sep 2012 18:02:20 +0000 Subject: [PATCH] added generics git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1391579 13f79535-47bb-0310-9956-ffa450edef68 --- .../lifecycle/internal/BuildListCalculatorTest.java | 4 ++-- .../maven/lifecycle/internal/BuilderCommonTest.java | 4 ++-- .../internal/ConcurrencyDependencyGraphTest.java | 3 ++- .../maven/lifecycle/internal/ExecutionPlanItemTest.java | 3 ++- .../internal/LifecycleExecutionPlanCalculatorTest.java | 6 ++---- .../lifecycle/internal/LifecycleWeaveBuilderTest.java | 5 +++-- .../maven/lifecycle/internal/PhaseRecorderTest.java | 2 ++ .../maven/lifecycle/internal/ProjectBuildListTest.java | 3 ++- .../maven/lifecycle/internal/ThreadOutputMuxerTest.java | 4 ++-- .../org/apache/maven/project/TestMetadataSource.java | 3 +-- .../project/canonical/CanonicalProjectBuilderTest.java | 9 +++------ .../org/apache/maven/settings/SettingsUtilsTest.java | 2 +- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java index 4c7a61de23..a0039832af 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java @@ -1,3 +1,5 @@ +package org.apache.maven.lifecycle.internal; + /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding @@ -13,8 +15,6 @@ * the License. */ -package org.apache.maven.lifecycle.internal; - import junit.framework.TestCase; import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.internal.stub.LifecycleTaskSegmentCalculatorStub; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuilderCommonTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuilderCommonTest.java index 21f0fc7915..a474848315 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuilderCommonTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuilderCommonTest.java @@ -1,3 +1,5 @@ +package org.apache.maven.lifecycle.internal; + /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding @@ -13,8 +15,6 @@ * the License. */ -package org.apache.maven.lifecycle.internal; - import junit.framework.TestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.execution.MavenSession; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java index a15cccac71..0bb122754f 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java @@ -1,3 +1,5 @@ +package org.apache.maven.lifecycle.internal; + /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding @@ -12,7 +14,6 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.maven.lifecycle.internal; import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.ProjectDependencyGraph; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ExecutionPlanItemTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ExecutionPlanItemTest.java index b7eacea5db..57caf95857 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ExecutionPlanItemTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ExecutionPlanItemTest.java @@ -1,3 +1,5 @@ +package org.apache.maven.lifecycle.internal; + /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding @@ -12,7 +14,6 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.maven.lifecycle.internal; import junit.framework.TestCase; import org.apache.maven.lifecycle.Schedule; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java index 13eedb463f..cddbf598d4 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java @@ -1,3 +1,5 @@ +package org.apache.maven.lifecycle.internal; + /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding @@ -13,10 +15,6 @@ * the License. */ -package org.apache.maven.lifecycle.internal; - -import java.io.File; - import org.apache.maven.AbstractCoreMavenComponentTestCase; import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.MavenExecutionPlan; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilderTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilderTest.java index fa777f950d..a44267b960 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilderTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilderTest.java @@ -1,3 +1,5 @@ +package org.apache.maven.lifecycle.internal; + /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding @@ -12,7 +14,6 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.maven.lifecycle.internal; import junit.framework.TestCase; import org.apache.maven.execution.DefaultMavenExecutionResult; @@ -41,7 +42,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** - * @author Kristian Rosenvold> + * @author Kristian Rosenvold */ public class LifecycleWeaveBuilderTest extends TestCase diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java index 77d10e512b..12e1f86778 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java @@ -1,4 +1,5 @@ package org.apache.maven.lifecycle.internal; + /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding @@ -13,6 +14,7 @@ package org.apache.maven.lifecycle.internal; * or implied. See the License for the specific language governing permissions and limitations under * the License. */ + import junit.framework.TestCase; import org.apache.maven.lifecycle.MavenExecutionPlan; import org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java index 8049237e17..047ef9fe95 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java @@ -1,3 +1,5 @@ +package org.apache.maven.lifecycle.internal; + /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding @@ -12,7 +14,6 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.maven.lifecycle.internal; import junit.framework.TestCase; import org.apache.maven.execution.MavenSession; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ThreadOutputMuxerTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ThreadOutputMuxerTest.java index 40fcadfb1b..f040566e8a 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ThreadOutputMuxerTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ThreadOutputMuxerTest.java @@ -1,3 +1,5 @@ +package org.apache.maven.lifecycle.internal; + /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding @@ -12,7 +14,6 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.maven.lifecycle.internal; import junit.framework.TestCase; import org.apache.maven.execution.MavenSession; @@ -94,7 +95,6 @@ public class ThreadOutputMuxerTest Arrays.asList( "Thinkin", "of", "a", "master", "plan", "Cuz", "ain’t", "nuthin", "but", "sweat", "inside", "my", "hand" ); Iterator lyrics = stringList.iterator(); - List outputters = new ArrayList(); ExecutorService executor = Executors.newFixedThreadPool( 10 ); CompletionService service = new ExecutorCompletionService( executor ); diff --git a/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java b/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java index bacedd6af5..67b6ca4167 100644 --- a/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java +++ b/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java @@ -26,11 +26,10 @@ import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.metadata.ResolutionGroup; import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.project.artifact.MavenMetadataSource; import org.codehaus.plexus.component.annotations.Component; -@Component(role=ArtifactMetadataSource.class,hint="classpath") +@Component( role = ArtifactMetadataSource.class, hint = "classpath" ) public class TestMetadataSource extends MavenMetadataSource { diff --git a/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java index c75055cab6..5421f94f47 100644 --- a/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java @@ -20,7 +20,6 @@ package org.apache.maven.project.canonical; */ import java.io.File; -import java.util.Iterator; import java.util.List; import org.apache.maven.model.Plugin; @@ -52,17 +51,15 @@ public class CanonicalProjectBuilderTest // Plugins // ---------------------------------------------------------------------- - List plugins = project.getBuildPlugins(); + List plugins = project.getBuildPlugins(); // Plugin0 [plexus] String key = "org.apache.maven.plugins:maven-plexus-plugin"; Plugin plugin = null; - for ( Iterator it = plugins.iterator(); it.hasNext(); ) + for ( Plugin check : plugins ) { - Plugin check = (Plugin) it.next(); - if ( key.equals( check.getKey() ) ) { plugin = check; @@ -87,7 +84,7 @@ public class CanonicalProjectBuilderTest // Goal specific configuration // ---------------------------------------------------------------------- - List executions = plugin.getExecutions(); + List executions = plugin.getExecutions(); PluginExecution execution = (PluginExecution) executions.get( 0 ); diff --git a/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java b/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java index 63ef4737ce..f2231b3f5f 100644 --- a/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java +++ b/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java @@ -41,7 +41,7 @@ public class SettingsUtilsTest SettingsUtils.merge( dominant, recessive, Settings.GLOBAL_LEVEL ); - List pluginGroups = dominant.getPluginGroups(); + List pluginGroups = dominant.getPluginGroups(); assertNotNull( pluginGroups ); assertEquals( 3, pluginGroups.size() );