continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r576894 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
Date Tue, 18 Sep 2007 13:12:48 GMT
Author: evenisse
Date: Tue Sep 18 06:12:47 2007
New Revision: 576894

URL: http://svn.apache.org/viewvc?rev=576894&view=rev
Log:
Sort project by name

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java?rev=576894&r1=576893&r2=576894&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
Tue Sep 18 06:12:47 2007
@@ -29,6 +29,8 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -73,7 +75,7 @@
 
         Map buildResultsInSuccess = getContinuum().getBuildResultsInSuccess( projectGroupId
);
 
-        summary = new ArrayList();
+        summary = new ArrayList<ProjectSummary>();
 
         groupSummary.setNumErrors( 0 );
         groupSummary.setNumFailures( 0 );
@@ -139,6 +141,16 @@
 
             summary.add( model );
         }
+
+        Comparator<ProjectSummary> projectComparator = new Comparator<ProjectSummary>()
+        {
+            public int compare( ProjectSummary ps1, ProjectSummary ps2 )
+            {
+                return ps1.getName().compareTo( ps2.getName() );
+            }
+        };
+
+        Collections.sort( summary, projectComparator );
 
         return SUCCESS;
     }



Mime
View raw message