added generics

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1391579 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Herve Boutemy 2012-09-28 18:02:20 +00:00
parent 46c73b75de
commit 6215e507a5
12 changed files with 24 additions and 24 deletions

View File

@ -1,3 +1,5 @@
package org.apache.maven.lifecycle.internal;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license * 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 * agreements. See the NOTICE file distributed with this work for additional information regarding
@ -13,8 +15,6 @@
* the License. * the License.
*/ */
package org.apache.maven.lifecycle.internal;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.MavenSession;
import org.apache.maven.lifecycle.internal.stub.LifecycleTaskSegmentCalculatorStub; import org.apache.maven.lifecycle.internal.stub.LifecycleTaskSegmentCalculatorStub;

View File

@ -1,3 +1,5 @@
package org.apache.maven.lifecycle.internal;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license * 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 * agreements. See the NOTICE file distributed with this work for additional information regarding
@ -13,8 +15,6 @@
* the License. * the License.
*/ */
package org.apache.maven.lifecycle.internal;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.Artifact;
import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.MavenSession;

View File

@ -1,3 +1,5 @@
package org.apache.maven.lifecycle.internal;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license * 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 * 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 * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package org.apache.maven.lifecycle.internal;
import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.MavenSession;
import org.apache.maven.execution.ProjectDependencyGraph; import org.apache.maven.execution.ProjectDependencyGraph;

View File

@ -1,3 +1,5 @@
package org.apache.maven.lifecycle.internal;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license * 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 * 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 * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package org.apache.maven.lifecycle.internal;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.maven.lifecycle.Schedule; import org.apache.maven.lifecycle.Schedule;

View File

@ -1,3 +1,5 @@
package org.apache.maven.lifecycle.internal;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license * 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 * agreements. See the NOTICE file distributed with this work for additional information regarding
@ -13,10 +15,6 @@
* the License. * the License.
*/ */
package org.apache.maven.lifecycle.internal;
import java.io.File;
import org.apache.maven.AbstractCoreMavenComponentTestCase; import org.apache.maven.AbstractCoreMavenComponentTestCase;
import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.MavenSession;
import org.apache.maven.lifecycle.MavenExecutionPlan; import org.apache.maven.lifecycle.MavenExecutionPlan;

View File

@ -1,3 +1,5 @@
package org.apache.maven.lifecycle.internal;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license * 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 * 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 * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package org.apache.maven.lifecycle.internal;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.maven.execution.DefaultMavenExecutionResult; import org.apache.maven.execution.DefaultMavenExecutionResult;
@ -41,7 +42,7 @@
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
/** /**
* @author Kristian Rosenvold> * @author Kristian Rosenvold
*/ */
public class LifecycleWeaveBuilderTest public class LifecycleWeaveBuilderTest
extends TestCase extends TestCase

View File

@ -1,4 +1,5 @@
package org.apache.maven.lifecycle.internal; package org.apache.maven.lifecycle.internal;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license * 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 * agreements. See the NOTICE file distributed with this work for additional information regarding
@ -13,6 +14,7 @@
* or implied. See the License for the specific language governing permissions and limitations under * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.maven.lifecycle.MavenExecutionPlan; import org.apache.maven.lifecycle.MavenExecutionPlan;
import org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub; import org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub;

View File

@ -1,3 +1,5 @@
package org.apache.maven.lifecycle.internal;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license * 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 * 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 * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package org.apache.maven.lifecycle.internal;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.MavenSession;

View File

@ -1,3 +1,5 @@
package org.apache.maven.lifecycle.internal;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license * 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 * 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 * or implied. See the License for the specific language governing permissions and limitations under
* the License. * the License.
*/ */
package org.apache.maven.lifecycle.internal;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.MavenSession;
@ -94,7 +95,6 @@ public void testMultiThreaded()
Arrays.asList( "Thinkin", "of", "a", "master", "plan", "Cuz", "aint", "nuthin", "but", "sweat", "inside", Arrays.asList( "Thinkin", "of", "a", "master", "plan", "Cuz", "aint", "nuthin", "but", "sweat", "inside",
"my", "hand" ); "my", "hand" );
Iterator<String> lyrics = stringList.iterator(); Iterator<String> lyrics = stringList.iterator();
List<Outputter> outputters = new ArrayList<Outputter>();
ExecutorService executor = Executors.newFixedThreadPool( 10 ); ExecutorService executor = Executors.newFixedThreadPool( 10 );
CompletionService<ProjectSegment> service = new ExecutorCompletionService<ProjectSegment>( executor ); CompletionService<ProjectSegment> service = new ExecutorCompletionService<ProjectSegment>( executor );

View File

@ -26,11 +26,10 @@
import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
import org.apache.maven.artifact.metadata.ResolutionGroup; import org.apache.maven.artifact.metadata.ResolutionGroup;
import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
import org.apache.maven.project.artifact.MavenMetadataSource; import org.apache.maven.project.artifact.MavenMetadataSource;
import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Component;
@Component(role=ArtifactMetadataSource.class,hint="classpath") @Component( role = ArtifactMetadataSource.class, hint = "classpath" )
public class TestMetadataSource public class TestMetadataSource
extends MavenMetadataSource extends MavenMetadataSource
{ {

View File

@ -20,7 +20,6 @@
*/ */
import java.io.File; import java.io.File;
import java.util.Iterator;
import java.util.List; import java.util.List;
import org.apache.maven.model.Plugin; import org.apache.maven.model.Plugin;
@ -52,17 +51,15 @@ public void testProjectBuilder()
// Plugins // Plugins
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
List plugins = project.getBuildPlugins(); List<Plugin> plugins = project.getBuildPlugins();
// Plugin0 [plexus] // Plugin0 [plexus]
String key = "org.apache.maven.plugins:maven-plexus-plugin"; String key = "org.apache.maven.plugins:maven-plexus-plugin";
Plugin plugin = null; Plugin plugin = null;
for ( Iterator it = plugins.iterator(); it.hasNext(); ) for ( Plugin check : plugins )
{ {
Plugin check = (Plugin) it.next();
if ( key.equals( check.getKey() ) ) if ( key.equals( check.getKey() ) )
{ {
plugin = check; plugin = check;
@ -87,7 +84,7 @@ public void testProjectBuilder()
// Goal specific configuration // Goal specific configuration
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
List executions = plugin.getExecutions(); List<PluginExecution> executions = plugin.getExecutions();
PluginExecution execution = (PluginExecution) executions.get( 0 ); PluginExecution execution = (PluginExecution) executions.get( 0 );

View File

@ -41,7 +41,7 @@ public void testShouldAppendRecessivePluginGroupIds()
SettingsUtils.merge( dominant, recessive, Settings.GLOBAL_LEVEL ); SettingsUtils.merge( dominant, recessive, Settings.GLOBAL_LEVEL );
List pluginGroups = dominant.getPluginGroups(); List<String> pluginGroups = dominant.getPluginGroups();
assertNotNull( pluginGroups ); assertNotNull( pluginGroups );
assertEquals( 3, pluginGroups.size() ); assertEquals( 3, pluginGroups.size() );