camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-6204) loadResourceAsStream in ObjectHelper could not load resource with leading "/"
Date Mon, 25 Mar 2013 16:17:15 GMT

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

Claus Ibsen updated CAMEL-6204:
-------------------------------

    Affects Version/s:     (was: 2.11.1)
                       2.10.4
        Fix Version/s: 2.11.0
                       2.10.5
    
> loadResourceAsStream in ObjectHelper could not load resource with leading "/"
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-6204
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6204
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.10.4
>            Reporter: Piotr Klimczak
>            Assignee: Willem Jiang
>            Priority: Minor
>              Labels: ObjectHelper, camel-core,, load, resource, util
>             Fix For: 2.10.5, 2.11.0
>
>         Attachments: CAMEL6204.diff
>
>
> As i could not found any test for ObjectHelper.loadResourceAsStream and i have feced
some unexpected behaviur I have created a simple unit test.
> The expected result is to get all resources loaded.
> Unfortunately ObjectHelper.loadResourceAsStream does no allow to load resource from relative
path and for path with leading "/".
> I my opinion it is a bug.
> {code}
>     public void testLoadResourceAsStream() {
>         InputStream res1 = ObjectHelper.loadResourceAsStream("org/apache/camel/util/ObjectHelperResourceTestFile.properties");
>         InputStream res2 = ObjectHelper.loadResourceAsStream("/org/apache/camel/util/ObjectHelperResourceTestFile.properties");
>         assertNotNull("Cannot load resource without leading \"/\"", res1);
>         assertNotNull("Cannot load resource with leading \"/\"", res2);
>     }
> {code}

--
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

Mime
View raw message