felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r421984 - /incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
Date Fri, 14 Jul 2006 18:55:59 GMT
Author: rickhall
Date: Fri Jul 14 11:55:59 2006
New Revision: 421984

URL: http://svn.apache.org/viewvc?rev=421984&view=rev
Log:
Modified StartLevel implementation to sort by bundle ID within a given start
level as per the spec.

Modified:
    incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java

Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java?rev=421984&r1=421983&r2=421984&view=diff
==============================================================================
--- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
(original)
+++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
Fri Jul 14 11:55:59 2006
@@ -674,7 +674,7 @@
             // Sort bundle array by start level either ascending or
             // descending depending on whether the start level is being
             // lowered or raised to that the bundles can be efficiently
-            // processed in order.
+            // processed in order. Within a start level sort by bundle ID.
             Comparator comparator = null;
             if (lowering)
             {
@@ -694,7 +694,11 @@
                         {
                             return -1;
                         }
-                        return 0;
+                        else if (b1.getInfo().getBundleId() < b2.getInfo().getBundleId())
+                        {
+                            return 1;
+                        }
+                        return -1;
                     }
                 };
             }
@@ -716,7 +720,11 @@
                         {
                             return -1;
                         }
-                        return 0;
+                        else if (b1.getInfo().getBundleId() > b2.getInfo().getBundleId())
+                        {
+                            return 1;
+                        }
+                        return -1;
                     }
                 };
             }



Mime
View raw message