-
Sub-task
-
Resolution: Fixed
-
P4
-
9
-
None
-
b24
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8056766 | emb-9 | Unassigned | P4 | Resolved | Fixed | b24 |
Just two examples are included here to give some context:
com/sun/jndi/ldap/ClientId.java
ClientId(int version, String hostname, int port, String protocol,
Control[] bindCtls, OutputStream trace, String socketFactory) {
....
Class<?> objClass = Class.forName("java.lang.Object");
....
This can of course be replaced with java.lang.Object.class!
---
com/sun/jndi/ldap/Connection.java
private Object createInetSocketAddress(String host, int port)
throws NoSuchMethodException {
try {
Class<?> inetSocketAddressClass =
Class.forName("java.net.InetSocketAddress");
Constructor<?> inetSocketAddressCons =
inetSocketAddressClass.getConstructor(new Class<?>[]{
String.class, int.class});
return inetSocketAddressCons.newInstance(new Object[]{
host, new Integer(port)});
} catch (ClassNotFoundException |
InstantiationException |
InvocationTargetException |
IllegalAccessException e) {
throw new NoSuchMethodException();
}
}
java.net.SocketAddress is a core class.
- backported by
-
JDK-8056766 Remove redundant use of reflection on core classes from JNDI
- Resolved
- csr for
-
JDK-8327828 Remove redundant use of reflection on core classes from JNDI
- Draft
- relates to
-
JDK-8050851 Remove unnecessary reflective instantiations of custom socket factories
- Open
-
JDK-8050798 New unchecked warning introduced in com.sun.jndi.ldap.Connection
- Resolved
-
JDK-8325029 Connection.java now requires custom socket factories to implement javax.net.SocketFactory
- Resolved
-
JDK-8051350 Update javadoc for com.sun.jndi.toolkit.corba.CorbaUtils
- Resolved
-
JDK-8325579 Inconsistent behavior in com.sun.jndi.ldap.Connection::createSocket
- Closed