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:25:25 UTC
[6/6] git commit: [KARAF-2806] The bundle:watch commands fails when
updating o.a.k.bundle.core bundle
[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/d2249e43
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/d2249e43
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/d2249e43
Branch: refs/heads/master
Commit: d2249e439e4f107d7ca7dcfdffd63a1eacb02218
Parents: 571c6f9
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:23:37 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/d2249e43/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 1a9b076..665dc1b 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
@@ -97,6 +97,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) {
@@ -110,7 +112,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();