You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jd...@apache.org on 2005/05/26 23:12:07 UTC
svn commit: r178691 -
/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
Author: jdcasey
Date: Thu May 26 14:12:06 2005
New Revision: 178691
URL: http://svn.apache.org/viewcvs?rev=178691&view=rev
Log:
added null checks for everything that's in the hashCode() method, to try to avoid cryptic errors, at least until the xml validation improves.
Modified:
maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
Modified: maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java?rev=178691&r1=178690&r2=178691&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java (original)
+++ maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java Thu May 26 14:12:06 2005
@@ -71,10 +71,27 @@
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;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org