Author: brett
Date: Tue Jun  7 09:09:59 2005
New Revision: 188807

URL: http://svn.apache.org/viewcvs?rev=188807&view=rev
Log:
avoid NPE if either of the ids are not specified

Modified:
    
maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java

Modified: 
maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java?rev=188807&r1=188806&r2=188807&view=diff
==============================================================================
--- 
maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java
 (original)
+++ 
maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java
 Tue Jun  7 09:09:59 2005
@@ -100,12 +100,12 @@
             throw new BuildException( "Unable to resolve artifact", e );
         }
 
-        if ( getProject().getReference( pathId ) != null )
+        if ( pathId != null && getProject().getReference( pathId ) != null )
         {
             throw new BuildException( "Reference ID " + pathId + " already 
exists" );
         }
 
-        if ( getProject().getReference( filesetId ) != null )
+        if ( filesetId != null && getProject().getReference( filesetId ) != 
null )
         {
             throw new BuildException( "Reference ID " + filesetId + " already 
exists" );
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to