[ https://issues.apache.org/jira/browse/FELIX-4534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031109#comment-14031109 ]
David Bosschaert commented on FELIX-4534: ----------------------------------------- I wrote an implementation in http://svn.apache.org/viewvc?view=revision&revision=1602511 I basically didn't go for the easiest way I described above, but use a map of all the normalized names instead so that already normalized osnames won't be normalized again. This should be a little faster at runtime and this should also be really easy to change to having these names stored in a properties file, in a later commit. Benoît, would you have time to see whether this fixes the issue for you? Richard, are you happy with the approach I took? If not I'm happy to change things... > 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 "windows7": > 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 (v6.2#6252)