diff --git a/bundles/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF
index 0a60e767518..0b222098fda 100644
--- a/bundles/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.supplement
-Bundle-Version: 1.10.900.qualifier
+Bundle-Version: 1.11.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.equinox.log;version="1.1",
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
index 439efc4f65a..64a69198220 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
@@ -25,6 +25,7 @@
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
+import java.util.TreeMap;
import org.eclipse.osgi.internal.messages.Msg;
import org.eclipse.osgi.internal.util.SupplementDebug;
import org.eclipse.osgi.internal.util.Tokenizer;
@@ -485,6 +486,27 @@ public static String[] getArrayFromList(String stringList, String separator) {
return list.toArray(new String[list.size()]);
}
+ /**
+ * Parses a bundle manifest and returns the header/value pairs into as case
+ * insensitive map. Only the main section of the manifest is parsed (up to the
+ * first blank line). All other sections are ignored. If a header is duplicated
+ * then only the last value is stored in the map.
+ *
+ * The supplied input stream is consumed by this method and will be closed.
+ *
+ *
+ * @param manifest an input stream for a bundle manifest.
+ * @throws BundleException if the manifest has an invalid syntax
+ * @throws IOException if an error occurs while reading the manifest
+ * @return the map with the header/value pairs from the bundle manifest
+ * @since 3.21
+ */
+ public static Map parseBundleManifest(InputStream manifest) throws IOException, BundleException {
+ Map headers = new TreeMap<>(String::compareToIgnoreCase);
+ parseBundleManifest(manifest, headers);
+ return headers;
+ }
+
/**
* Parses a bundle manifest and puts the header/value pairs into the supplied Map.
* Only the main section of the manifest is parsed (up to the first blank line). All