felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4534) Bundles containing native code fails to start on Windows 7
Date Fri, 13 Jun 2014 15:39:01 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14030754#comment-14030754

Richard S. Hall commented on FELIX-4534:

Ok, I think the best approach is to simply not re-normalize already normal names. Thanks!

> Bundles containing native code fails to start on Windows 7
> ----------------------------------------------------------
>                 Key: FELIX-4534
>                 URL: https://issues.apache.org/jira/browse/FELIX-4534
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.2.0, framework-4.2.1, framework-4.4.0
>         Environment: Windows 7
>            Reporter: Benoît Thiébault
>            Assignee: David Bosschaert
>             Fix For: framework-4.6.0
> Windows 7 system is not properly recognized which makes bundles containing native code
fail to start.
> The OS name is retrieved using Java system property in org.apache.felix.Felix class,
line 4481. OS name is then "Windows 7", with a space.
> It is then normalized using method org.apache.felix.framework.util.manifestparser.R4LibraryClause.normalizeOSName()
and stored in the configMap. OS name becomes "windows7" without the space.
> When starting the bundle, method org.apache.felix.framework.util.manifestparser.R4LibraryClause.match()
is called, retrieves the already normalized OS name ("windows7") in the configMap and normalizes
it again.
> This second normalisation fails as "windows7" without the space is not recognized by
method org.apache.felix.framework.util.manifestparser.R4LibraryClause.normalizeOSName().
> In particular, the condition in the if statement line 392 is false when the OS name is
> if ((value.indexOf(" 7") >= 0) || value.equals("win7"))
> Possible solutions are:
> - prevent the OS name to be normalized twice (by checking if it is already normal)
> - improve the normalisation to deal with "windows7" OS name (by replacing the if statement
with if ((value.indexOf("7") >= 0)) <- no space)

This message was sent by Atlassian JIRA

View raw message