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] Created: (HARMONY-6220) [classlib][jndi] javax.naming.spi.NamingManager.getURLContext(String schema, Hashtable<?, ?> env) return null context for "rmi" schema
Date Mon, 01 Jun 2009 06:12:07 GMT
[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
             Fix For: 5.0M10


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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message