ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1372594 - in /ant/ivy/core/trunk/src/java/org/apache/ivy: core/settings/IvySettings.java plugins/parser/xml/XmlModuleDescriptorParser.java
Date Mon, 13 Aug 2012 20:41:47 GMT
Author: hibou
Date: Mon Aug 13 20:41:46 2012
New Revision: 1372594

URL: http://svn.apache.org/viewvc?rev=1372594&view=rev
Log:
IVY-1363 : Remove the incorrect ERROR output and remove useless resolver map (thanks to Mitch
Gitman)

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/IvySettings.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/IvySettings.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/IvySettings.java?rev=1372594&r1=1372593&r2=1372594&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/IvySettings.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/IvySettings.java Mon Aug 13 20:41:46
2012
@@ -875,6 +875,10 @@ public class IvySettings implements Sort
         return getResolver(resolverName);
     }
 
+    public boolean hasResolver(String resolverName) {
+        return resolversMap.containsKey(resolverName);
+    }
+
     public DependencyResolver getResolver(String resolverName) {
         if (dictatorResolver != null) {
             return dictatorResolver;

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java?rev=1372594&r1=1372593&r2=1372594&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
Mon Aug 13 20:41:46 2012
@@ -230,31 +230,6 @@ public class XmlModuleDescriptorParser e
         public Parser(ModuleDescriptorParser parser, ParserSettings ivySettings) {
             super(parser);
             settings = ivySettings;
-            configureModuleInheritanceRepository();
-        }
-
-        /**
-         * Configure module inheritance repository (repository containning all path references

-         * to parent modules). Basicaly it checks if module inheritance repository exist

-         * in current ivy context, otherwise it will create one as a {@link URLResolver}
-         */
-        protected void configureModuleInheritanceRepository() {
-            IvySettings ivysettings = IvyContext.getContext().getSettings();
-            DependencyResolver parentModuleResolver=null;
-            //Does module-inheritance-repository exists ?
-            for (Iterator iterator = ivysettings.getResolvers().iterator(); iterator.hasNext();)
{
-                DependencyResolver resolver = (DependencyResolver) iterator.next();
-                if (resolver.getName().equals(MODULE_INHERITANCE_REPOSITORY)) {
-                    parentModuleResolver=resolver;
-                    break;
-                }
-            }
-            //if does not exist create one 
-            if (parentModuleResolver == null) {
-                parentModuleResolver= new URLResolver();
-                parentModuleResolver.setName(MODULE_INHERITANCE_REPOSITORY);
-                ivysettings.addResolver(parentModuleResolver);
-            }
         }
 
         public void setInput(InputStream descriptorInput) {
@@ -634,7 +609,7 @@ public class XmlModuleDescriptorParser e
             // Is parent module reachable using location attribute?
             if (url.openConnection().getContentLength() > 0) {
                 String urlString = url.toExternalForm();
-                if (ivyContext.getSettings().getResolver(getModuleInheritanceRepositoryParentResolverName(parentMrid))
== null) {
+                if (!ivyContext.getSettings().hasResolver(getModuleInheritanceRepositoryParentResolverName(parentMrid)))
{
                     Message.debug("Registering parent module into module inheritance repository
map. Parent module location: " + urlString);
                     URLResolver parentModuleResolver = new URLResolver();
                     parentModuleResolver.setName(getModuleInheritanceRepositoryParentResolverName(parentMrid));



Mime
View raw message