You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (JIRA)" <ji...@apache.org> on 2013/01/31 16:23:14 UTC

[jira] [Updated] (FELIX-3342) Throw FileNotFound exception when trying to get a resource that does not exist

     [ https://issues.apache.org/jira/browse/FELIX-3342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-3342:
-----------------------------------

    Fix Version/s:     (was: framework-4.2.0)
                   framework-4.4.0
    
> Throw FileNotFound exception when trying to get a resource that does not exist
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-3342
>                 URL: https://issues.apache.org/jira/browse/FELIX-3342
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Irving Cordova
>            Priority: Minor
>             Fix For: framework-4.4.0
>
>
> Currently when a resource is not found inside a bundle, an IOException is thrown with the message: "Resource does not exist" . It would be more useful to throw instead a FileNotFound exception. This behavior happens outside OSGi and also in Equinox. For example look the stack trace in Equinox:
> java.io.FileNotFoundException: /resource/myresource.stg
> at
> org.eclipse.osgi.framework.internal.protocol.bundleresource.Handler.findBundleEntry(Handler.java:51)
> at
> org.eclipse.osgi.framework.internal.core.BundleResourceHandler.openConnection(BundleResourceHandler.java:175)
> at java.net.URL.openConnection(URL.java:945)
> at java.net.URL.openStream(URL.java:1010)
> This small fix would improve compatibility with 3rd parties that rely on this behavior, and also improve compatibility with the behavior in equinox. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira