[ https://issues.apache.org/jira/browse/FELIX-5850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16471054#comment-16471054 ]
ASF GitHub Bot commented on FELIX-5850: --------------------------------------- GitHub user jbonofre opened a pull request: https://github.com/apache/felix/pull/137 [FELIX-5850] Deal with non present Bundle-ManifestVersion header You can merge this pull request into a Git repository by running: $ git pull https://github.com/jbonofre/felix FELIX-5850 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/felix/pull/137.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #137 ---- commit 3feb7cdc85446a9092b482b9b7ec70f2adf9df54 Author: Jean-Baptiste Onofré <jb@...> Date: 2018-05-10T16:49:57Z [FELIX-5850] Deal with non present Bundle-ManifestVersion header ---- > 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é > Priority: Major > 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)