added null checks for everything that's in the hashCode() method, to try to avoid cryptic errors, at least until the xml validation improves.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@178691 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-05-26 21:12:06 +00:00
parent 84269d34fa
commit d942cfe550
1 changed files with 17 additions and 0 deletions

View File

@ -71,10 +71,27 @@ public class DefaultArtifact
throw new NullPointerException( "Artifact type cannot be null." );
}
if( groupId == null )
{
throw new NullPointerException( "Artifact groupId cannot be null." );
}
this.groupId = groupId;
if( artifactId == null )
{
throw new NullPointerException( "Artifact artifactId cannot be null." );
}
this.artifactId = artifactId;
if( version == null )
{
throw new NullPointerException( "Artifact version cannot be null." );
}
this.version = version;
this.type = type;