RFR JDK-8048175: Remove redundant use of reflection on core classes from JNDI

Pavel Rappo pavel.rappo at oracle.com
Mon Jul 14 11:43:50 UTC 2014


Hi everyone,

Could you please review my change for JDK-8048175?

http://cr.openjdk.java.net/~prappo/8048175/webrev.00/

Summary

1. com.sun.jndi.ldap.Connection imports both java.net.InetSocketAddress and javax.net.SocketFactory which are available since 1.4
2. com.sun.jndi.toolkit.corba.CorbaUtils defines 3 imports from java.rmi and java.rmi.CORBA. Justification: CorbaUtils is used by the com.sun.jndi.cosnaming package which resides in CORBA module. Which in turn has a dependency on RMI module.
3. com.sun.jndi.cosnaming.RemoteToCorba.getStateToBind method doesn't handle ClassNotFoundException internally. There's no need for that now (see 2). 
4. com.sun.jndi.ldap.VersionHelper instantiates only the com.sun.jndi.ldap.VersionHelper12. Justification: the rudimentary test for jdk version is no longer needed as JNDI is a part of the platform and com.sun.jndi.ldap.VersionHelper11 is no longer available (at least since 1.3). 

All corresponding reflection usages have been removed.

Thanks
-Pavel



More information about the core-libs-dev mailing list