[MNG-7637] Possible NPE in MavenProject#hashCode()

This closes #921
This commit is contained in:
Christoph Läubrich 2022-12-18 11:39:02 +01:00 committed by Michael Osipov
parent 828de7e1a8
commit 7a1cc12a47
1 changed files with 1 additions and 5 deletions

View File

@ -909,11 +909,7 @@ public class MavenProject implements Cloneable {
@Override
public int hashCode() {
int hash = 17;
hash = 31 * hash + getGroupId().hashCode();
hash = 31 * hash + getArtifactId().hashCode();
hash = 31 * hash + getVersion().hashCode();
return hash;
return Objects.hash(getGroupId(), getArtifactId(), getVersion());
}
public List<Extension> getBuildExtensions() {