You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2009/09/02 11:20:10 UTC
svn commit: r810431 -
/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
Author: bdelacretaz
Date: Wed Sep 2 09:20:08 2009
New Revision: 810431
URL: http://svn.apache.org/viewvc?rev=810431&view=rev
Log:
SLING-1078 - BundleRemoveTask only stops active bundles (avoid problems with fragment bundles)
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
Modified: sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java?rev=810431&r1=810430&r2=810431&view=diff
==============================================================================
--- sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java (original)
+++ sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java Wed Sep 2 09:20:08 2009
@@ -50,7 +50,10 @@
if(b == null) {
throw new IllegalStateException("Bundle to remove (" + symbolicName + ") not found");
}
- b.stop();
+ final int state = b.getState();
+ if(state == Bundle.ACTIVE || state == Bundle.STARTING) {
+ b.stop();
+ }
b.uninstall();
ctx.addTaskToCurrentCycle(new SynchronousRefreshPackagesTask());
ctx.incrementCounter(OsgiInstaller.OSGI_TASKS_COUNTER);