MNG-1849 Fix Extension.hashCode() throwing NPE if groupId or artifactId is null

Submitted by: David Hawkins



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@543381 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2007-06-01 03:47:31 +00:00
parent 6cb79190cd
commit 6db368df4e
1 changed files with 3 additions and 3 deletions

View File

@ -3888,8 +3888,8 @@
public int hashCode()
{
int result = 17;
result = 37 * result + getArtifactId().hashCode();
result = 37 * result + getGroupId().hashCode();
result = 37 * result + getArtifactId() != null ? getArtifactId().hashCode() : 0;
result = 37 * result + getGroupId() != null ? getGroupId().hashCode() : 0;
result = 37 * result + getVersion() != null ? getVersion().hashCode() : 0;
return result;
}