mirror of https://github.com/apache/maven.git
Fixing NPE.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@328898 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
58e96169a6
commit
51f23d93d9
|
@ -175,11 +175,14 @@ public class ProjectSorter
|
|||
project.addProjectReference( extProject );
|
||||
|
||||
MavenProject extParent = extProject.getParent();
|
||||
String parentId = ArtifactUtils.versionlessKey( extParent.getGroupId(), extParent.getArtifactId() );
|
||||
// Don't add edge from parent to extension if a reverse edge already exists
|
||||
if ( !dag.hasEdge( extensionId, id ) || !parentId.equals( id ) )
|
||||
if ( extParent != null )
|
||||
{
|
||||
dag.addEdge( id, extensionId );
|
||||
String parentId = ArtifactUtils.versionlessKey( extParent.getGroupId(), extParent.getArtifactId() );
|
||||
// Don't add edge from parent to extension if a reverse edge already exists
|
||||
if ( !dag.hasEdge( extensionId, id ) || !parentId.equals( id ) )
|
||||
{
|
||||
dag.addEdge( id, extensionId );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue