harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2047) [classlib][luni]ClassLoader.getResourceAsStream() fails to get property file with special char in its name
Date Mon, 20 Nov 2006 14:43:05 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-2047?page=comments#action_12451320 ] 
Paulex Yang commented on HARMONY-2047:

Leo, my comments inline

--  1. I need to add the "test#.properties" to a jar which is included in the classpath of
running junits and support.jar serves. Besides, I find the other jars used by archive testcases
are also add in it. In my memory, it was a location for resource repositry. Have I missed

the test resources for specific module should go to <module>/src/test/resources/<path
with package>, it will be copied into classpath by build script when building test codes.

--     2. Furthermore, in the patch I add "." to the classpath of run-tests in the build.xml
of luni module. So I wonder if ClassTest.test_getResourceAsStream_withSharpChar() fails due
to this since testcases pass on my machine.

OK, I'll try again.

--     3. As to "%", after I digging into it, I found it is another story with a different
reason. Seems in the getResourceAsStream, RI will not call the decode of URL. Because of the
calling stack, I am trying to find an elegent resolution to avoid side-effect. So I recommend
to report it as another jira to fix.

If so, +1 to raise another jira. But it's really confusing that how many other special character
URL need to handle? should we get more tests on this class?

> [classlib][luni]ClassLoader.getResourceAsStream() fails to get property file with special
char in its name
> ----------------------------------------------------------------------------------------------------------
>                 Key: HARMONY-2047
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2047
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Leo Li
>         Assigned To: Paulex Yang
>         Attachments: patch.diff
> ClassLoader.getResourceAsStream() fails to get property file with special char in its
> Here is the testcase:
> (First pls put a property file called "AAA#.properties" in where can be searched by classpath.)
> public void testGetResourceAsStream() throws Exception
> {
>         InputStream in = TestClassLoader.class.getClassLoader().getResourceAsStream("AAA#.properties");
>         assertNotNull(in);
> }

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message