-
Bug
-
Resolution: Fixed
-
P3
-
11, 17, 21, 22, 23
-
b16
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8329792 | 22.0.2 | Christoph Langer | P3 | Resolved | Fixed | b03 |
JDK-8330081 | 21.0.4 | Christoph Langer | P3 | Resolved | Fixed | b01 |
JDK-8331685 | 17.0.12 | Christoph Langer | P3 | Resolved | Fixed | b02 |
JDK-8331770 | 11.0.24 | Christoph Langer | P3 | Resolved | Fixed | b02 |
"If a timeout is supplied but unconnected sockets are not supported then the timeout is ignored and a connected socket is created."
This, however does not happen. If a SocketFactory would not support unconnected sockets, it would likely throw a SocketException in SocketFactory::createSocket() [1]. And since the code does not check for this behavior [2], a connection with timeout value through a SocketFactory that does not support unconnected sockets would just always fail with an IOException.
So we should either make the code adhere to what is documented or adapt the documentation to the actual behavior.
The current behavior is present since JDK 9, introduced with
[0] https://github.com/openjdk/jdk/blob/3ebe6c192a5dd5cc46ae2d263713c9ff38cd46bb/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java#L281
[1] https://github.com/openjdk/jdk/blob/6303c0e7136436a2d3cb6043b88edf788c0067cc/src/java.base/share/classes/javax/net/SocketFactory.java#L123
[2] https://github.com/openjdk/jdk/blob/3ebe6c192a5dd5cc46ae2d263713c9ff38cd46bb/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java#L336
- backported by
-
JDK-8329792 Inconsistent behavior in com.sun.jndi.ldap.Connection::createSocket
- Resolved
-
JDK-8330081 Inconsistent behavior in com.sun.jndi.ldap.Connection::createSocket
- Resolved
-
JDK-8331685 Inconsistent behavior in com.sun.jndi.ldap.Connection::createSocket
- Resolved
-
JDK-8331770 Inconsistent behavior in com.sun.jndi.ldap.Connection::createSocket
- Resolved
- csr for
-
JDK-8326482 Inconsistent behavior in com.sun.jndi.ldap.Connection::createSocket
- Closed
- relates to
-
JDK-8048175 Remove redundant use of reflection on core classes from JNDI
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/c542dc91
-
Commit openjdk/jdk17u-dev/32bf1f41
-
Commit openjdk/jdk21u-dev/fbb424f9
-
Commit openjdk/jdk22u/92d6fa4a
-
Commit openjdk/jdk/907e30ff
-
Review openjdk/jdk11u-dev/2699
-
Review openjdk/jdk17u-dev/2396
-
Review openjdk/jdk21u-dev/466
-
Review openjdk/jdk22u/114
-
Review openjdk/jdk/17797