ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r613187 - in /ant/ivy/core/trunk/src/java/org/apache/ivy/core/report: ConfigurationResolveReport.java ResolveReport.java
Date Fri, 18 Jan 2008 15:29:21 GMT
Author: xavier
Date: Fri Jan 18 07:29:11 2008
New Revision: 613187

URL: http://svn.apache.org/viewvc?rev=613187&view=rev
Log:
use LinkedHashSet and LinkedHashMap to preserve order

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ResolveReport.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java?rev=613187&r1=613186&r2=613187&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
Fri Jan 18 07:29:11 2008
@@ -23,7 +23,6 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Date;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -54,7 +53,7 @@
 
     private Date date;
 
-    private Map dependencyReports = new HashMap();
+    private Map dependencyReports = new LinkedHashMap();
 
     private Map dependencies = new LinkedHashMap();
 
@@ -178,7 +177,7 @@
     }
 
     private Set/*<ModuleRevisionId>*/ getEvictedMrids() {
-        Set/*<ModuleRevisionId>*/ evicted = new HashSet();
+        Set/*<ModuleRevisionId>*/ evicted = new LinkedHashSet();
         IvyNode[] evictedNodes = getEvictedNodes();
         for (int i = 0; i < evictedNodes.length; i++) {
             evicted.add(evictedNodes[i].getId());
@@ -234,7 +233,7 @@
                 ModuleId mid = dependency.getResolvedId().getModuleId();
                 Collection deps = (Collection) modulesIdsMap.get(mid);
                 if (deps == null) {
-                    deps = new HashSet();
+                    deps = new LinkedHashSet();
                     modulesIdsMap.put(mid, deps);
                 }
                 deps.add(dependency);
@@ -288,7 +287,7 @@
      */
     public ArtifactDownloadReport[] getArtifactsReports(
             DownloadStatus downloadStatus, boolean withEvicted) {
-        Collection all = new HashSet();
+        Collection all = new LinkedHashSet();
         Collection evictedMrids = null;
         if (!withEvicted) {
             evictedMrids = getEvictedMrids();

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ResolveReport.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ResolveReport.java?rev=613187&r1=613186&r2=613187&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ResolveReport.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ResolveReport.java Fri Jan 18 07:29:11
2008
@@ -21,9 +21,9 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 
@@ -104,7 +104,7 @@
     }
 
     public IvyNode[] getEvictedNodes() {
-        Collection all = new HashSet();
+        Collection all = new LinkedHashSet();
         for (Iterator iter = confReports.values().iterator(); iter.hasNext();) {
             ConfigurationResolveReport report = (ConfigurationResolveReport) iter.next();
             all.addAll(Arrays.asList(report.getEvictedNodes()));
@@ -113,7 +113,7 @@
     }
 
     public IvyNode[] getUnresolvedDependencies() {
-        Collection all = new HashSet();
+        Collection all = new LinkedHashSet();
         for (Iterator iter = confReports.values().iterator(); iter.hasNext();) {
             ConfigurationResolveReport report = (ConfigurationResolveReport) iter.next();
             all.addAll(Arrays.asList(report.getUnresolvedDependencies()));
@@ -155,7 +155,7 @@
      */
     public ArtifactDownloadReport[] getArtifactsReports(
             DownloadStatus downloadStatus, boolean withEvicted) {
-        Collection all = new HashSet();
+        Collection all = new LinkedHashSet();
         for (Iterator iter = confReports.values().iterator(); iter.hasNext();) {
             ConfigurationResolveReport report = (ConfigurationResolveReport) iter.next();
             ArtifactDownloadReport[] reports = 
@@ -166,7 +166,7 @@
     }
 
     public ArtifactDownloadReport[] getArtifactsReports(ModuleRevisionId mrid) {
-        Collection all = new HashSet();
+        Collection all = new LinkedHashSet();
         for (Iterator iter = confReports.values().iterator(); iter.hasNext();) {
             ConfigurationResolveReport report = (ConfigurationResolveReport) iter.next();
             all.addAll(Arrays.asList(report.getDownloadReports(mrid)));



Mime
View raw message