Author: rickhall
Date: Tue Aug 25 18:46:46 2009
New Revision: 807760
URL: http://svn.apache.org/viewvc?rev=807760&view=rev
Log:
Modify bundle uninstall state transitions to transition through INSTALLED
on the way to UNINSTALLED. (FELIX-1527)
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
URL:
http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=807760&r1=807759&r2=807760&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
Tue Aug 25 18:46:46 2009
@@ -2218,6 +2218,12 @@
Logger.LOG_ERROR, "Unable to remove bundle from installed
map!");
}
+ setBundleStateAndNotify(bundle, Bundle.INSTALLED);
+
+ // Unfortunately, fire UNRESOLVED event while holding the lock,
+ // since we still need to change the bundle state.
+ fireBundleEvent(BundleEvent.UNRESOLVED, bundle);
+
// Set state to uninstalled.
setBundleStateAndNotify(bundle, Bundle.UNINSTALLED);
bundle.setLastModified(System.currentTimeMillis());
@@ -2228,9 +2234,6 @@
releaseBundleLock(bundle);
}
- // Fire UNRESOLVED event without holding the lock.
- fireBundleEvent(BundleEvent.UNRESOLVED, bundle);
-
// Fire UNINSTALLED event without holding the lock.
fireBundleEvent(BundleEvent.UNINSTALLED, bundle);