~ceefour/maven/2.2

« back to all changes in this revision

Viewing changes to maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java

  • Committer: hboutemy
  • Date: 2011-07-27 21:05:38 UTC
  • Revision ID: svn-v4:13f79535-47bb-0310-9956-ffa450edef68:maven/maven-2/branches/maven-2.2.x:1151628
added generics

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
import org.apache.maven.model.Model;
28
28
import org.apache.maven.model.PluginManagement;
29
29
import org.apache.maven.model.Reporting;
 
30
import org.apache.maven.model.Resource;
30
31
import org.apache.maven.model.Scm;
31
32
import org.apache.maven.model.Site;
32
33
import org.apache.maven.project.ModelUtils;
33
34
import org.codehaus.plexus.util.StringUtils;
34
35
 
35
 
import java.util.Iterator;
36
36
import java.util.LinkedList;
37
37
import java.util.List;
38
38
import java.util.Map;
196
196
            }
197
197
            else
198
198
            {
199
 
                List childDeps = childDepMgmt.getDependencies();
 
199
                List<Dependency> childDeps = childDepMgmt.getDependencies();
200
200
 
201
 
                Map mappedChildDeps = new TreeMap();
202
 
                for ( Iterator it = childDeps.iterator(); it.hasNext(); )
 
201
                Map<String, Dependency> mappedChildDeps = new TreeMap<String, Dependency>();
 
202
                for ( Dependency dep : childDeps )
203
203
                {
204
 
                    Dependency dep = (Dependency) it.next();
205
204
                    mappedChildDeps.put( dep.getManagementKey(), dep );
206
205
                }
207
206
 
208
 
                for ( Iterator it = parentDepMgmt.getDependencies().iterator(); it.hasNext(); )
 
207
                for ( Dependency dep : parentDepMgmt.getDependencies() )
209
208
                {
210
 
                    Dependency dep = (Dependency) it.next();
211
209
                    if ( !mappedChildDeps.containsKey( dep.getManagementKey() ) )
212
210
                    {
213
211
                        childDepMgmt.addDependency( dep );
319
317
 
320
318
        ModelUtils.mergeFilterLists( childBuild.getFilters(), parentBuild.getFilters() );
321
319
 
322
 
        List resources = childBuild.getResources();
 
320
        List<Resource> resources = childBuild.getResources();
323
321
        if ( ( resources == null ) || resources.isEmpty() )
324
322
        {
325
323
            childBuild.setResources( parentBuild.getResources() );
514
512
    // TODO: Move this to plexus-utils' PathTool.
515
513
    private static String resolvePath( String uncleanPath )
516
514
    {
517
 
        LinkedList pathElements = new LinkedList();
 
515
        LinkedList<String> pathElements = new LinkedList<String>();
518
516
 
519
517
        StringTokenizer tokenizer = new StringTokenizer( uncleanPath, "/" );
520
518