incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r810431 - /sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
Date Wed, 02 Sep 2009 09:20:10 GMT
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);



Mime
View raw message