[ 
https://issues.apache.org/jira/browse/MNG-7637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17648985#comment-17648985
 ] 

Christoph Läubrich commented on MNG-7637:
-----------------------------------------

Nothing I found directly, I think this is also rather a rare case, as these 
most likely optional because a child can inherit it from a parent, so this case 
can only arise for such cases where one really mess up things...

> NPE in MavenProject#hashCode if erornous xml
> --------------------------------------------
>
>                 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)

Reply via email to