You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ma...@apache.org on 2012/08/18 00:39:28 UTC

svn commit: r1374461 - in /ant/ivy/core/branches/2.3.x: ./ src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java

Author: maartenc
Date: Fri Aug 17 22:39:28 2012
New Revision: 1374461

URL: http://svn.apache.org/viewvc?rev=1374461&view=rev
Log:
Avoid error message being printed when the resolver didn't exist (merged from trunk)

Modified:
    ant/ivy/core/branches/2.3.x/   (props changed)
    ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java

Propchange: ant/ivy/core/branches/2.3.x/
------------------------------------------------------------------------------
  Merged /ant/ivy/core/trunk:r1374457

Modified: ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java?rev=1374461&r1=1374460&r2=1374461&view=diff
==============================================================================
--- ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java (original)
+++ ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java Fri Aug 17 22:39:28 2012
@@ -663,11 +663,14 @@ public class XmlModuleDescriptorParser e
             options.setDownload(false);
             ResolveData data = new ResolveData(engine, options);
 
-            DependencyResolver resolver = IvyContext.getContext().getSettings().getResolver(getModuleInheritanceRepositoryParentResolverName(parentMrid));
-            // The parent resolver will be null if its dev-only filesystem path hasn't been specified via the location attribute of the extends element. 
-            if (resolver == null) {
+            IvySettings settings = IvyContext.getContext().getSettings();
+            String resolverName = getModuleInheritanceRepositoryParentResolverName(parentMrid);
+            if (!settings.hasResolver(resolverName)) {
+                // The parent resolver will not exist if its dev-only filesystem path hasn't been specified via the location attribute of the extends element. 
                 return null;
             }
+            
+            DependencyResolver resolver = settings.getResolver(resolverName);
             dd = NameSpaceHelper.toSystem(dd, getSettings().getContextNamespace());
             ResolvedModuleRevision otherModule = resolver.getDependency(dd, data);
             if (otherModule != null) {