You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Herve Boutemy (Jira)" <ji...@apache.org> on 2020/07/13 20:19:00 UTC
[jira] [Closed] (ARCHETYPE-585) Missing null check causes
NullPointerException
[ https://issues.apache.org/jira/browse/ARCHETYPE-585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Herve Boutemy closed ARCHETYPE-585.
-----------------------------------
Resolution: Fixed
IIUC, merged in https://github.com/apache/maven-archetype/commit/ad50f129a48e935f1d5fcd49960c037fdd819981
> 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
> Assignee: Sylwester Lachiewicz
> Priority: Minor
> Fix For: 3.2.0
>
> 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)