felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Irving Cordova (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FELIX-3342) Throw FileNotFound exception when trying to get a resource that does not exist
Date Thu, 09 Feb 2012 04:09:59 GMT
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
            Reporter: Irving Cordova
            Priority: Minor

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 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message