maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piotr Zygielo (Jira)" <j...@apache.org>
Subject [jira] [Created] (MSHARED-863) Possible NPEx in Maven30DependencyResolver.resolveDependencies
Date Tue, 10 Mar 2020 07:16:00 GMT
Piotr Zygielo created MSHARED-863:
-------------------------------------

             Summary: Possible NPEx in Maven30DependencyResolver.resolveDependencies
                 Key: MSHARED-863
                 URL: https://issues.apache.org/jira/browse/MSHARED-863
             Project: Maven Shared Components
          Issue Type: Bug
          Components: maven-artifact-transfer
    Affects Versions: maven-artifact-transfer-0.12.0
            Reporter: Piotr Zygielo


Possible NPEx in [Maven30DependencyResolver.resolveDependencies|https://github.com/apache/maven-artifact-transfer/blob/dc0d6bd30b855e147576c4e9cdfacf1382d69f07/src/main/java/org/apache/maven/shared/transfer/dependencies/resolve/internal/Maven30DependencyResolver.java#L156]
{code:java}
        List<Dependency> aetherDependencies = new ArrayList<Dependency>( mavenDependencies.size()
);

         if ( mavenDependencies != null )
         {
             aetherDependencies = new ArrayList<Dependency>( mavenDependencies.size()
);
...
{code}
Line 161
{code:java}
         if ( mavenDependencies != null )
{code}
suggests that {{mavenDependencies}} can be {{null}}. 
However in such case previous {{mavenDependencies.size()}} results in {{NPEx}}.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message