ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r667028 - /ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
Date Thu, 12 Jun 2008 10:16:46 GMT
Author: xavier
Date: Thu Jun 12 03:16:46 2008
New Revision: 667028

URL: http://svn.apache.org/viewvc?rev=667028&view=rev
Log:
attempt to fix a bug with resolve mode dynamic, probably due to bad cloning of dependency
descriptor during mediation

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java?rev=667028&r1=667027&r2=667028&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
Thu Jun 12 03:16:46 2008
@@ -159,7 +159,7 @@
 
     private DependencyDescriptor asSystem = this;
 
-    public DefaultDependencyDescriptor(DependencyDescriptor dd, ModuleRevisionId revision)
{
+    private DefaultDependencyDescriptor(DefaultDependencyDescriptor dd, ModuleRevisionId
revision) {
         Checks.checkNotNull(dd, "dd");
         Checks.checkNotNull(revision, "revision");
         
@@ -169,24 +169,19 @@
                 + " original = " + dd.getDependencyId()
                 + " new = " + revision.getModuleId());
         }
-        md = null;
-        parentId = dd.getParentRevisionId();
+        md = dd.md;
+        parentId = dd.parentId;
         revId = revision;
-        dynamicRevId = dd.getDynamicConstraintDependencyRevisionId();
-        isForce = dd.isForce();
-        isChanging = dd.isChanging();
-        isTransitive = dd.isTransitive();
-        String[] moduleConfs = dd.getModuleConfigurations();
-        Map excludeRules = getExcludeRules();
-        Map includeRules = getIncludeRules();
-        for (int i = 0; i < moduleConfs.length; i++) {
-            confs.put(moduleConfs[i], new ArrayList(Arrays.asList(dd
-                    .getDependencyConfigurations(moduleConfs[i]))));
-            excludeRules.put(moduleConfs[i], new ArrayList(Arrays.asList(dd
-                    .getExcludeRules(moduleConfs[i]))));
-            includeRules.put(moduleConfs[i], new ArrayList(Arrays.asList(dd
-                    .getIncludeRules(moduleConfs[i]))));
-        }
+        dynamicRevId = dd.dynamicRevId;
+        isForce = dd.isForce;
+        isChanging = dd.isChanging;
+        isTransitive = dd.isTransitive;
+        namespace = dd.namespace;
+        confs.putAll(dd.confs);
+        excludeRules = dd.excludeRules == null ? null : new LinkedHashMap(dd.excludeRules);

+        includeRules = dd.includeRules == null ? null : new LinkedHashMap(dd.includeRules);

+        dependencyArtifacts = dd.dependencyArtifacts == null 
+                                ? null : new LinkedHashMap(dd.dependencyArtifacts);
     }
 
     public DefaultDependencyDescriptor(



Mime
View raw message