geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r505280 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy
Date Fri, 09 Feb 2007 13:23:14 GMT
Author: jdillon
Date: Fri Feb  9 05:23:14 2007
New Revision: 505280

URL: http://svn.apache.org/viewvc?view=rev&rev=505280
Log:
Sort iters numerically 

Modified:
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy?view=diff&rev=505280&r1=505279&r2=505280
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy
Fri Feb  9 05:23:14 2007
@@ -38,6 +38,20 @@
         super(name, 'packageName', PackageModel)
     }
     
+    //
+    // NOTE: Iteration names are numbers, so sort them like numbers
+    //
+    
+    int compareTo(obj) {
+        assert obj
+        
+        if (obj instanceof IterationModel) {
+            return name.toInteger() <=> obj.name.toInteger()
+        }
+        
+        super.compareTo(obj)
+    }
+    
     Collection getPackages() {
         return children.values().sort()
     }



Mime
View raw message