Fix logic bug in start level change handling where the active start level
was not getting initialized properly, thus causing it to improperly re-process
bundles on the boundaries of the start level change range. (FELIX-3411)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1443503 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index 99e1049..d8d7a41 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -1195,6 +1195,7 @@
// Determine the range of start levels to process.
int low = (isLowering) ? m_targetStartLevel + 1 : m_activeStartLevel + 1;
int high = (isLowering) ? m_activeStartLevel : m_targetStartLevel;
+ m_activeStartLevel = (isLowering) ? high : low;
// Process bundles and stop or start them accordingly.
while (bundlesRemaining)