You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2018/05/10 10:00:04 UTC
[jira] [Created] (FELIX-5850) ResourceBuilder should do deal with
null bundle manifest version
Jean-Baptiste Onofré created FELIX-5850:
-------------------------------------------
Summary: ResourceBuilder should do deal with null bundle manifest version
Key: FELIX-5850
URL: https://issues.apache.org/jira/browse/FELIX-5850
Project: Felix
Issue Type: Bug
Components: Utils
Reporter: Jean-Baptiste Onofré
Assignee: Jean-Baptiste Onofré
Fix For: utils-1.11.2
The {{ResourceBuilder#doBuild}} should deal with empty (null) bundle manifest version.
We should do:
{code}
private static String getBundleManifestVersion(Map<String, String> headerMap) {
return headerMap.get(Constants.BUNDLE_MANIFESTVERSION);
}
...
// Verify that only manifest version 2 is specified.
String manifestVersion = getBundleManifestVersion(headerMap);
if (!"2".equals(manifestVersion)) {
throw new BundleException("Bundle-ManifestVersion must be 2 but is: " + manifestVersion);
}
{code}
I will provide a PR (and test with Karaf itest).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)