[
https://issues.apache.org/jira/browse/FELIX-5850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16471518#comment-16471518
]
Jean-Baptiste Onofré commented on FELIX-5850:
---------------------------------------------
The change doesn't work either, now I have:
{code}
Caused by: org.osgi.framework.BundleException: Unable to build resource
for mvn:org.apache.karaf.itests/itests/4.2.1-SNAPSHOT: Bundle-ManifestVersion
must be 2 but is: null
at
org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:82)
at
org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:71)
at
org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:822)
... 14 more
{code}
I'm investigating a better fix (maybe not in Felix Utils ;)).
> 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)