incubator-ivy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gscok...@apache.org
Subject svn commit: r582811 - /incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
Date Mon, 08 Oct 2007 12:54:45 GMT
Author: gscokart
Date: Mon Oct  8 05:54:44 2007
New Revision: 582811

URL: http://svn.apache.org/viewvc?rev=582811&view=rev
Log:
IVY-618 : fix NPE when the module is evicted and the dependency descriptor is null

Modified:
    incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java?rev=582811&r1=582810&r2=582811&view=diff
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java Mon Oct
 8 05:54:44 2007
@@ -257,16 +257,13 @@
                                 throw new NullPointerException("getResolvedId() is null for
" 
                                     + dependencies[i].toString());
                             }
-                            if (depDescriptor == null) {
-                                throw new NullPointerException("getDescriptor() is null for
" 
-                                    + dependencies[i].toString());
-                            }
                             if (depRevisionId == null) {
                                 throw new NullPointerException("getDependencyRevisionId()
"
                                     + "is null for " + dd.toString());
                             }
                             String rev = depResolvedId.getRevision();
-                            String status = depDescriptor.getStatus();
+                            //The evicted modules have no descritpion, so we can't put their
status. 
+                            String status = depDescriptor==null ? "?" : depDescriptor.getStatus();
                             props.put(depRevisionId.encodeToString(), rev + " " + status);
                         }
                     }



Mime
View raw message