git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191800 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-06-22 11:24:31 +00:00
parent c3d0ba0846
commit 677a0dd7d5
1 changed files with 14 additions and 6 deletions

View File

@ -159,7 +159,10 @@ public class DefaultMavenProjectBuilder
private Map createManagedVersionMap( DependencyManagement dependencyManagement ) private Map createManagedVersionMap( DependencyManagement dependencyManagement )
{ {
Map map = new HashMap(); Map map;
if ( dependencyManagement != null && dependencyManagement.getDependencies() != null )
{
map = new HashMap();
for ( Iterator i = dependencyManagement.getDependencies().iterator(); i.hasNext(); ) for ( Iterator i = dependencyManagement.getDependencies().iterator(); i.hasNext(); )
{ {
Dependency d = (Dependency) i.next(); Dependency d = (Dependency) i.next();
@ -169,6 +172,11 @@ public class DefaultMavenProjectBuilder
map.put( d.getManagementKey(), artifact ); map.put( d.getManagementKey(), artifact );
} }
}
else
{
map = Collections.EMPTY_MAP;
}
return map; return map;
} }