Author: jbonofre
Date: Wed Apr 27 15:11:46 2011
New Revision: 1097139

URL: http://svn.apache.org/viewvc?rev=1097139&view=rev
Log:
[KARAF-557] Failed to check bundle which needs to be installed if the symbolic 
name contains attributes.

Modified:
    
karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java

Modified: 
karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
URL: 
http://svn.apache.org/viewvc/karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java?rev=1097139&r1=1097138&r2=1097139&view=diff
==============================================================================
--- 
karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
 (original)
+++ 
karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
 Wed Apr 27 15:11:46 2011
@@ -656,6 +656,11 @@ public class FeaturesServiceImpl impleme
                 throw new BundleException("Manifest not present in the first 
entry of the zip " + bundleLocation);
             }
             String sn = 
m.getMainAttributes().getValue(Constants.BUNDLE_SYMBOLICNAME);
+            // remove attributes from the symbolic name (like 
;blueprint.graceperiod:=false suffix)
+            int attributeIndexSep = sn.indexOf(';');
+            if (attributeIndexSep != -1) {
+                sn = sn.substring(0, attributeIndexSep);
+            }
             String vStr = 
m.getMainAttributes().getValue(Constants.BUNDLE_VERSION);
             Version v = vStr == null ? Version.emptyVersion : 
Version.parseVersion(vStr);
             for (Bundle b : bundleContext.getBundles()) {


Reply via email to