You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2023/10/20 07:58:01 UTC
[jira] [Updated] (MNG-7780) DefaultArtifact.equals throws NullPointerException if o.version is null
[ https://issues.apache.org/jira/browse/MNG-7780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet updated MNG-7780:
---------------------------------
Fix Version/s: 4.0.0
> DefaultArtifact.equals throws NullPointerException if o.version is null
> -----------------------------------------------------------------------
>
> Key: MNG-7780
> URL: https://issues.apache.org/jira/browse/MNG-7780
> Project: Maven
> Issue Type: Bug
> Affects Versions: 3.9.1, 4.0.0-alpha-5
> Reporter: Tobias Gruetzmacher
> Assignee: Guillaume Nodet
> Priority: Major
> Fix For: 4.0.0-alpha-7, 4.0.0
>
>
> DefaultArtifact.validateIdentity() only throws if BOTH version and versionRange are null, so it's possible to create an instance of DefaultArtifact where version == null. If such an instance ever ends up in DefaultArtifact.equals(o), the check {{a.getVersion().equals(version)}} will throw a NullPointerException.
> (This was observed while debugging an issue in versions-maven-plugin)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)