felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-3309) Dashes in qualifier get replaced by periods causing framework not to start up
Date Thu, 19 Jan 2012 17:49:40 GMT

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

Richard S. Hall commented on FELIX-3309:
----------------------------------------

I don't believe that we can use regex/pattern if we want to stay compatible with the Java
ME profiles.

So, we can improve the logic there, but we'll need to resort to cruder mechanisms.
                
> Dashes in qualifier get replaced by periods causing framework not to start up
> -----------------------------------------------------------------------------
>
>                 Key: FELIX-3309
>                 URL: https://issues.apache.org/jira/browse/FELIX-3309
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: framework-3.0.9
>            Reporter: Jonathan Anstey
>             Fix For: framework-4.2.0
>
>         Attachments: FELIX-3309.patch
>
>
> For a valid OSGi version such as 1.2.3.foo-123, the org.osgi.framework.Version class
was throwing an "invalid format" error:
> Could not create framework: java.lang.IllegalArgumentException: invalid format
> java.lang.IllegalArgumentException: invalid format
>  	at org.osgi.framework.Version.<init>(Version.java:140)
>  	at org.apache.felix.framework.ExtensionManager$ExtensionManagerModule.<init>(ExtensionManager.java:628)
>  	at org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:154)
>  	at org.apache.felix.framework.Felix.<init>(Felix.java:385)
>  	at org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)
> The cause of this was that in Felix.getFrameworkVersion the '-' character in the qualifier
was getting replaced with a '.' so the version was changed to 1.2.3.foo.123 which wasn't valid
anymore. Attaching a patch shortly that copies the code from VersionCleaner in the utils project
to properly clean up the incoming version String.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message