ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r636466 - /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Date Wed, 12 Mar 2008 19:21:49 GMT
Author: xavier
Date: Wed Mar 12 12:21:45 2008
New Revision: 636466

URL: http://svn.apache.org/viewvc?rev=636466&view=rev
Log:
prevent NPE when relocated module is not found

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=636466&r1=636465&r2=636466&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 Mar 12 12:21:45 2008
@@ -134,6 +134,12 @@
                     Message.warn("Resolution will only pick dependencies of the relocated
element."
                             + "  Artefact and other metadata will be ignored.");
                     ResolvedModuleRevision relocatedModule = parseOtherPom(ivySettings, relocation);
+                    if (relocatedModule == null) {
+                        throw new ParseException("impossible to load module "
+                            + relocation + " to which " 
+                            + mdBuilder.getModuleDescriptor().getModuleRevisionId()
+                            + " has been relocated", 0);
+                    }
                     DependencyDescriptor[] dds = relocatedModule.getDescriptor().getDependencies();
                     for (int i = 0; i < dds.length; i++) {
                         mdBuilder.addDependency(dds[i]);



Mime
View raw message