diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/InstallableUnitGenerator.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/InstallableUnitGenerator.java index b697af7715..959a6824ec 100644 --- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/InstallableUnitGenerator.java +++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/InstallableUnitGenerator.java @@ -81,11 +81,14 @@ public static Stream generateInstallableUnits(TargetBundle tar PublisherInfo publisherInfo = new PublisherInfo(); publisherInfo.setArtifactOptions(IPublisherInfo.A_INDEX); BundleDescription bundleDescription = BundlesAction.createBundleDescription(headers, null); - IInstallableUnit iu = BundlesAction.createBundleIU(bundleDescription, - BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), - bundleDescription.getVersion().toString()), - publisherInfo); - return Stream.of(iu); + // null if bundle contains invalid manifest headers + if (bundleDescription != null) { + IInstallableUnit iu = BundlesAction.createBundleIU(bundleDescription, + BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), + bundleDescription.getVersion().toString()), + publisherInfo); + return Stream.of(iu); + } } catch (IOException e) { // can't use it then... }