You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by ff...@apache.org on 2011/07/10 10:44:15 UTC
svn commit: r1144789 -
/karaf/branches/karaf-2.2.x/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
Author: ffang
Date: Sun Jul 10 08:44:15 2011
New Revision: 1144789
URL: http://svn.apache.org/viewvc?rev=1144789&view=rev
Log:
[KARAF-722]throw more meaningful exception but not NPE when the BUNDLE_SYMBOLICNAME is null
Modified:
karaf/branches/karaf-2.2.x/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
Modified: karaf/branches/karaf-2.2.x/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java?rev=1144789&r1=1144788&r2=1144789&view=diff
==============================================================================
--- karaf/branches/karaf-2.2.x/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java (original)
+++ karaf/branches/karaf-2.2.x/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java Sun Jul 10 08:44:15 2011
@@ -657,6 +657,9 @@ 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);
+ if (sn == null) {
+ throw new BundleException("Jar is not a bundle, no Bundle-SymbolicName " + bundleLocation);
+ }
// remove attributes from the symbolic name (like ;blueprint.graceperiod:=false suffix)
int attributeIndexSep = sn.indexOf(';');
if (attributeIndexSep != -1) {