You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Harald Wellmann (JIRA)" <ji...@apache.org> on 2014/07/05 16:22:34 UTC

[jira] [Commented] (FELIX-4551) NullPointerException when using felix.jarurls

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

Harald Wellmann commented on FELIX-4551:
----------------------------------------

Regarding the underlying usecase and the discussion in FELIX-2645, it would be nice to have an official OSGi API to do this kind of URL conversion - does anybody know why the proposed property never made it into a spec release? 

I'd be happy with any alternative solution that does not force me to use reflection hacks (which is what I'm doing now). If OSGi Alliance can't agree on an API, a container-specific API is still better than no API at all. Equinox has an {{org.eclipse.osgi.service.urlconversion.URLConverter}} service for this purpose.

> NullPointerException when using felix.jarurls
> ---------------------------------------------
>
>                 Key: FELIX-4551
>                 URL: https://issues.apache.org/jira/browse/FELIX-4551
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.4.0
>            Reporter: Harald Wellmann
>
> I've tried using the (undocumented) {{felix.jarurls}} framework property to obtain standard local URLs for bundle resources (see FELIX-2645). 
> This causes a {{NullPointerException}} for non-existing resources when calling
> {code}
> bundle.adapt(BundleWiring.class).getClassLoader().getResource("does/not/exist")
> {code}
> since {{BundleWiringImpl.convertToLocalUrl(URL)}} does not contain a null check for its argument.



--
This message was sent by Atlassian JIRA
(v6.2#6252)