You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2014/03/05 23:24:15 UTC

git commit: [KARAF-2806] The bundle:watch commands fails when updating o.a.k.bundle.core bundle

Repository: karaf
Updated Branches:
  refs/heads/karaf-3.0.x 78ca25a21 -> 7f35a9229


[KARAF-2806] The bundle:watch commands fails when updating o.a.k.bundle.core bundle


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/7f35a922
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/7f35a922
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/7f35a922

Branch: refs/heads/karaf-3.0.x
Commit: 7f35a9229cf97264fcff59e9be4a72603da73eff
Parents: 78ca25a
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Wed Mar 5 23:23:37 2014 +0100
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Wed Mar 5 23:24:06 2014 +0100

----------------------------------------------------------------------
 .../org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/7f35a922/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java b/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
index 925e3ba..570426f 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
@@ -98,6 +98,8 @@ public class BundleWatcherImpl implements Runnable, BundleListener, BundleWatche
                 }
             }
             if (watchedBundles.size() > 0) {
+                // Get the wiring before any in case of a refresh of a dependency
+                FrameworkWiring wiring = bundleContext.getBundle(0).adapt(FrameworkWiring.class);
                 File localRepository = this.localRepoDetector.getLocalRepository();
                 List<Bundle> updated = new ArrayList<Bundle>();
                 for (Bundle bundle : watchedBundles) {
@@ -111,7 +113,6 @@ public class BundleWatcherImpl implements Runnable, BundleListener, BundleWatche
                 }
                 try {
                     final CountDownLatch latch = new CountDownLatch(1);
-                    FrameworkWiring wiring = bundleContext.getBundle(0).adapt(FrameworkWiring.class);
                     wiring.refreshBundles(updated, new FrameworkListener() {
                         public void frameworkEvent(FrameworkEvent event) {
                             latch.countDown();