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 2010/08/16 09:50:11 UTC
svn commit: r985818 -
/karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
Author: gnodet
Date: Mon Aug 16 07:50:10 2010
New Revision: 985818
URL: http://svn.apache.org/viewvc?rev=985818&view=rev
Log:
KARAF-133: NPE when installing a bundle with a MANIFEST.MF not in the first entry of the zip
Patch provided by Ioannis Canellos
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=985818&r1=985817&r2=985818&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 Mon Aug 16 07:50:10 2010
@@ -557,6 +557,9 @@ public class FeaturesServiceImpl impleme
is.mark(256 * 1024);
JarInputStream jar = new JarInputStream(is);
Manifest m = jar.getManifest();
+ if(m == null) {
+ throw new BundleException("Manifest not present in the first entry of the zip");
+ }
String sn = m.getMainAttributes().getValue(Constants.BUNDLE_SYMBOLICNAME);
String vStr = m.getMainAttributes().getValue(Constants.BUNDLE_VERSION);
Version v = vStr == null ? Version.emptyVersion : Version.parseVersion(vStr);