ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r644402 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/ant/IvyArtifactReport.java src/java/org/apache/ivy/core/resolve/ResolveEngine.java
Date Thu, 03 Apr 2008 16:45:46 GMT
Author: xavier
Date: Thu Apr  3 09:45:44 2008
New Revision: 644402

URL: http://svn.apache.org/viewvc?rev=644402&view=rev
Log:
FIX: NullPointerException during ResovleEngine.downloadArtifacts. (IVY-592)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyArtifactReport.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=644402&r1=644401&r2=644402&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu Apr  3 09:45:44 2008
@@ -76,6 +76,7 @@
 - IMPROVEMENT: Change allownomd and skipbuildwithoutivy into a more semantically correct
name (IVY-297)
 - IMPROVEMENT: Smarter determination if an expression is exact or not for RegexpPatternMatcher
and GlobPatternMatcher
 
+- FIX: NullPointerException during ResovleEngine.downloadArtifacts. (IVY-592)
 - FIX: setting m2compatible on ibiblio resolver overwrite root and pattern settings (IVY-437)
(thanks to Jing Xue)
 - FIX: unable to resolve snapshot versions (IVY-501)
 - FIX: No error or warning when a resolver references a non-existent cache (IVY-777)

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyArtifactReport.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyArtifactReport.java?rev=644402&r1=644401&r2=644402&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyArtifactReport.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyArtifactReport.java Thu Apr  3 09:45:44
2008
@@ -42,6 +42,7 @@
 import org.apache.ivy.core.report.ArtifactDownloadReport;
 import org.apache.ivy.core.resolve.IvyNode;
 import org.apache.ivy.core.resolve.ResolveOptions;
+import org.apache.ivy.core.resolve.ResolvedModuleRevision;
 import org.apache.ivy.core.retrieve.RetrieveOptions;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
@@ -199,9 +200,10 @@
         moduleAttrs.addAttribute(null, "organisation", "organisation", "CDATA", dependency
                 .getModuleId().getOrganisation());
         moduleAttrs.addAttribute(null, "name", "name", "CDATA", dependency.getModuleId().getName());
-        moduleAttrs.addAttribute(null, "rev", "rev", "CDATA", dependency.getModuleRevision()
+        ResolvedModuleRevision moduleRevision = dependency.getModuleRevision();
+        moduleAttrs.addAttribute(null, "rev", "rev", "CDATA", moduleRevision
                 .getId().getRevision());
-        moduleAttrs.addAttribute(null, "status", "status", "CDATA", dependency.getModuleRevision()
+        moduleAttrs.addAttribute(null, "status", "status", "CDATA", moduleRevision
                 .getDescriptor().getStatus());
         saxHandler.startElement(null, "module", "module", moduleAttrs);
     }

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java?rev=644402&r1=644401&r2=644402&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java Thu Apr  3
09:45:44 2008
@@ -334,7 +334,8 @@
         for (int i = 0; i < dependencies.length; i++) {
             checkInterrupted();
             // download artifacts required in all asked configurations
-            if (!dependencies[i].isCompletelyEvicted() && !dependencies[i].hasProblem())
{
+            if (!dependencies[i].isCompletelyEvicted() && !dependencies[i].hasProblem()
+                    && dependencies[i].getModuleRevision() != null) {
                 DependencyResolver resolver = dependencies[i].getModuleRevision()
                         .getArtifactResolver();
                 Artifact[] selectedArtifacts = dependencies[i].getSelectedArtifacts(artifactFilter);



Mime
View raw message