harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6220) [classlib][jndi] javax.naming.spi.NamingManager.getURLContext(String schema, Hashtable<?, ?> env) return null context for "rmi" schema
Date Wed, 14 Apr 2010 06:24:56 GMT

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

Kevin Zhou updated HARMONY-6220:
--------------------------------

    Attachment: HARMONY-6220v2.diff

Refine the patch for this issue.

> [classlib][jndi] javax.naming.spi.NamingManager.getURLContext(String schema, Hashtable<?,
?> env) return null context for "rmi" schema
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6220
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6220
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M9
>            Reporter: Kevin Zhou
>            Assignee: Kevin Zhou
>         Attachments: HARMONY-6220.diff, HARMONY-6220v2.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Given a test case [1], RI passes both of them while HARMONY fails the 1st scenario.
> For scenario 1: RI returns a object of com.sun.jndi.url.rmi.rmiURLContext class, but
HARMONY returns null
> For scenario 2: both RI and HARMONY return a object of org.apache.harmony.jndi.provider.rmi.rmiURLContext
class.
> I think in our implementation of NamingManager, we should add a default values for "java.naming.factory.url.pkgs"
property. It should contains "com.sun.jndi.url" package. Also, it should try to load class
from Harmony customized package "org.apache.harmony.jndi.provider". What do you think?
> [1] Test Case:
> public void test_NamingManager_getURLContext_scenario1() throws Exception {
>     Hashtable env = new Hashtable();
>     Context context = NamingManager.getURLContext("rmi", env);
>     assertNotNull(context);
>     System.out.println(context);
> }
> public void test_NamingManager_getURLContext_scenario2() throws Exception {
>     Hashtable env = new Hashtable();
>     env.put(Context.URL_PKG_PREFIXES, "org.apache.harmony.jndi.provider");
>     Context context = NamingManager.getURLContext("rmi", env);
>     assertNotNull(context);
>     System.out.println(context);
> }

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

        

Mime
View raw message