mirror of https://github.com/apache/maven.git
fix possible NPE as filter can be null (dependency:tree)
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@785405 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
17d876713c
commit
0852f8d21d
|
@ -250,10 +250,12 @@ public class MavenProject
|
|||
for ( Dependency d : getDependencies() )
|
||||
{
|
||||
Artifact dependencyArtifact = repositorySystem.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), d.getScope(), d.getType() );
|
||||
|
||||
if ( filter.include( dependencyArtifact ) )
|
||||
if ( filter != null )
|
||||
{
|
||||
artifacts.add( dependencyArtifact );
|
||||
if ( filter.include( dependencyArtifact ) )
|
||||
{
|
||||
artifacts.add( dependencyArtifact );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue