You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sylwester Lachiewicz (Jira)" <ji...@apache.org> on 2020/07/02 20:08:00 UTC

[jira] [Updated] (ARCHETYPE-585) Missing null check causes NullPointerException

     [ https://issues.apache.org/jira/browse/ARCHETYPE-585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylwester Lachiewicz updated ARCHETYPE-585:
-------------------------------------------
    Priority: Minor  (was: Critical)

> Missing null check causes NullPointerException
> ----------------------------------------------
>
>                 Key: ARCHETYPE-585
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-585
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 3.1.2
>            Reporter: Tony Homer
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> RemoteCatalogArchetypeDataSource.getArchetypeCatalog calls [RemoteCatalogArchetypeDataSource.getMirror|https://github.com/apache/maven-archetype/blob/maven-archetype-3.1.2/archetype-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java#L86].
> RemoteCatalogArchetypeDataSource.getMirror calls legacySupport.getSession, then [invokes getRequest on the returned value|https://github.com/apache/maven-archetype/blob/maven-archetype-3.1.2/archetype-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java#L299] with no null check.
> When the legacySupport session is null, this results in a NullPointerException.
> The fix is to add a null check before calling session.getRequest.



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