ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r635977 - /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Date Tue, 11 Mar 2008 15:37:19 GMT
Author: xavier
Date: Tue Mar 11 08:37:15 2008
New Revision: 635977

URL: http://svn.apache.org/viewvc?rev=635977&view=rev
Log:
prevent NPE when loading parent pom failed

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java?rev=635977&r1=635976&r2=635977&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Tue Mar 11 08:37:15 2008
@@ -171,7 +171,12 @@
                         domReader.getParentVersion());
                     ResolvedModuleRevision parentModule = parseOtherPom(ivySettings, 
                         parentModRevID);
-                    parentDescr = parentModule.getDescriptor();
+                    if (parentModule != null) {
+                        parentDescr = parentModule.getDescriptor();
+                    } else {
+                       Message.warn("impossible to load parent for " + descriptorURL + "."
+                           + " Parent=" + parentModRevID); 
+                    }
                 }
                                 
                 Map pomProperties = domReader.getPomProperties();



Mime
View raw message