You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2022/12/18 11:24:00 UTC
[jira] [Closed] (MNG-7637) Possible NPE in MavenProject#hashCode()
[ https://issues.apache.org/jira/browse/MNG-7637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed MNG-7637.
-------------------------------
Resolution: Fixed
Fixed with [7a1cc12a47a4082b7d6761bc960306bc8d9fd083|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=7a1cc12a47a4082b7d6761bc960306bc8d9fd083], with [4db9b94baf520e34a5aa9f47cdf7c0053b910d83|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=4db9b94baf520e34a5aa9f47cdf7c0053b910d83] for {{maven-3.9.x}} branch, with [4fbbcc322ece8f07cd7d6c40b499c2afcdabf60c|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=4fbbcc322ece8f07cd7d6c40b499c2afcdabf60c] for {{maven-3.8.x}} branch.
> Possible NPE in MavenProject#hashCode()
> ---------------------------------------
>
> Key: MNG-7637
> URL: https://issues.apache.org/jira/browse/MNG-7637
> Project: Maven
> Issue Type: Bug
> Affects Versions: 3.8.6, 4.0.0-alpha-3
> Reporter: Christoph Läubrich
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 3.9.0, 4.0.0, 4.0.0-alpha-4, 3.8.7
>
>
> org.apache.maven.project.MavenProject.hashCode() has the following code:
> {code:java}
> public int hashCode()
> {
> int hash = 17;
> hash = 31 * hash + getGroupId().hashCode();
> hash = 31 * hash + getArtifactId().hashCode();
> hash = 31 * hash + getVersion().hashCode();
> return hash;
> }
> {code}
> if any of those values is null, a NPE is thrown from the method.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)