Author: jvanzyl
Date: Thu May 31 20:47:23 2007
New Revision: 543380
URL: http://svn.apache.org/viewvc?view=rev&rev=543380
Log:
MNG-1849 Fix Extension.hashCode() throwing NPE if groupId or artifactId is null
Submitted by: David Hawkins
Modified:
maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo
Modified:
maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo
URL:
http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo?view=diff&rev=543380&r1=543379&r2=543380
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo
(original)
+++ maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo
Thu May 31 20:47:23 2007
@@ -3842,8 +3842,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;
}