Author: gnodet Date: Tue Jul 16 07:35:44 2013 New Revision: 1503581 URL: http://svn.apache.org/r1503581 Log: [KARAF-2373] Generic capabilities should be formatted correctly when displaying bundle headers
Modified: karaf/branches/karaf-2.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/Headers.java Modified: karaf/branches/karaf-2.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/Headers.java URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/Headers.java?rev=1503581&r1=1503580&r2=1503581&view=diff ============================================================================== --- karaf/branches/karaf-2.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/Headers.java (original) +++ karaf/branches/karaf-2.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/Headers.java Tue Jul 16 07:35:44 2013 @@ -45,6 +45,7 @@ public class Headers extends BundlesComm protected final static String BUNDLE_PREFIX = "Bundle-"; protected final static String PACKAGE_SUFFFIX = "-Package"; protected final static String SERVICE_SUFFIX = "-Service"; + protected final static String CAPABILITY_SUFFIX = "-Capability"; protected final static String IMPORT_PACKAGES_ATTRIB = "Import-Package"; protected final static String REQUIRE_BUNDLE_ATTRIB = "Require-Bundle"; @@ -117,7 +118,7 @@ public class Headers extends BundlesComm if (k.startsWith(BUNDLE_PREFIX)) { // starts with Bundle-xxx bundleAttribs.put(k, v); - } else if (k.endsWith(SERVICE_SUFFIX)) { + } else if (k.endsWith(SERVICE_SUFFIX) || k.endsWith(CAPABILITY_SUFFIX)) { // ends with xxx-Service serviceAttribs.put(k, v); } else if (k.endsWith(PACKAGE_SUFFFIX)) {