karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject git commit: [KARAF-2806] The bundle:watch commands fails when updating o.a.k.bundle.core bundle
Date Wed, 05 Mar 2014 22:24:15 GMT
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 <gnodet@gmail.com>
Authored: Wed Mar 5 23:23:37 2014 +0100
Committer: Guillaume Nodet <gnodet@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();


Mime
View raw message