mirror of https://github.com/apache/maven.git
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:
parent
84269d34fa
commit
d942cfe550
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue