You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2015/01/14 18:56:56 UTC

karaf-cellar git commit: [KARAF-2250] Fix cluster:bundle-list display for some version

Repository: karaf-cellar
Updated Branches:
  refs/heads/master ff474da16 -> 86756cc05


[KARAF-2250] Fix cluster:bundle-list display for some version


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

Branch: refs/heads/master
Commit: 86756cc054c18c14b129ba3750d4ca177f5caae1
Parents: ff474da
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Wed Jan 14 18:56:25 2015 +0100
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Wed Jan 14 18:56:25 2015 +0100

----------------------------------------------------------------------
 .../apache/karaf/cellar/bundle/shell/BundleCommandSupport.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/86756cc0/bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/BundleCommandSupport.java
----------------------------------------------------------------------
diff --git a/bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/BundleCommandSupport.java b/bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/BundleCommandSupport.java
index 245208c..6e7f98e 100644
--- a/bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/BundleCommandSupport.java
+++ b/bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/BundleCommandSupport.java
@@ -179,7 +179,8 @@ public abstract class BundleCommandSupport extends CellarCommandSupport {
 
         // retrieve local bundles
         for (Bundle bundle : bundleContext.getBundles()) {
-            String key = bundle.getSymbolicName() + "/" + bundle.getVersion().toString();
+            String version = (String) bundle.getHeaders().get(org.osgi.framework.Constants.BUNDLE_VERSION);
+            String key = bundle.getSymbolicName() + "/" + version;
             if (bundles.containsKey(key)) {
                 ExtendedBundleState extendedState = bundles.get(key);
                 extendedState.setLocal(true);