From 5073d13e4b7b4f994c7114c7170659db0868d0c1 Mon Sep 17 00:00:00 2001 From: Andrey Loskutov Date: Thu, 16 May 2024 14:09:30 +0200 Subject: [PATCH] Don't fail with NPE on non existing manifest Fixes https://github.com/eclipse-pde/eclipse.pde/issues/1272 --- .../src/org/eclipse/pde/internal/publishing/Utils.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java index 24004afd36..ff6ed03f09 100644 --- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java +++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java @@ -103,7 +103,14 @@ public static String[] getBundleClasspath(Dictionary manifest) { return result; } + /** + * @param manifest manifest entries, or {@code null} + * @return requested header value, or {@code null} + */ public static String getBundleManifestHeader(Dictionary manifest, String header) { + if (manifest == null) { + return null; + } String value = manifest.get(header); if (value != null) return value;