ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r700792 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Date Wed, 01 Oct 2008 14:41:39 GMT
Author: xavier
Date: Wed Oct  1 07:41:39 2008
New Revision: 700792

URL: http://svn.apache.org/viewvc?rev=700792&view=rev
Log:
FIX: NullPointerException when Ivy cannot locate pom parent (IVY-927)

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

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=700792&r1=700791&r2=700792&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Wed Oct  1 07:41:39 2008
@@ -84,6 +84,7 @@
 - IMPROVEMENT: Error messages on use of relative paths can be cyrptic (IVY-909)
 - IMPROVEMENT: Maven accepts illegal XML for its pom's, Ivy not (IVY-921)
 
+- FIX: NullPointerException when Ivy cannot locate pom parent (IVY-927)
 - FIX: Cannot configure items with java.io.File attributes (IVY-905)
 - FIX: Environment properties in ivy settings are no longer resolved (IVY-907)
 - FIX: Resolve failed on certain proxy environment (IVY-911)

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=700792&r1=700791&r2=700792&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
Wed Oct  1 07:41:39 2008
@@ -137,13 +137,14 @@
                    Message.warn("impossible to load parent for " + descriptorURL + "."
                        + " Parent=" + parentModRevID); 
                 }
-                
-                Map parentPomProps = PomModuleDescriptorBuilder.extractPomProperties(
-                                                                parentDescr.getExtraInfo());
-                for (Iterator iter = parentPomProps.entrySet().iterator(); iter.hasNext();)
{
-                    Map.Entry prop = (Map.Entry) iter.next();
-                    domReader.setProperty((String) prop.getKey(), (String) prop.getValue());
-                }                    
+                if (parentDescr != null) {
+                    Map parentPomProps = PomModuleDescriptorBuilder.extractPomProperties(
+                        parentDescr.getExtraInfo());
+                    for (Iterator iter = parentPomProps.entrySet().iterator(); iter.hasNext();)
{
+                        Map.Entry prop = (Map.Entry) iter.next();
+                        domReader.setProperty((String) prop.getKey(), (String) prop.getValue());
+                    }                    
+                }
             }
                             
             String groupId = domReader.getGroupId();



Mime
View raw message