RFR: 8314063 : The socket is not closed in Connection::createSocket when the handshake failed for LDAP connection [v2]
Mark Sheppard
msheppar at openjdk.org
Wed Aug 16 23:00:27 UTC 2023
On Wed, 16 Aug 2023 18:10:04 GMT, Aleksei Efimov <aefimov at openjdk.org> wrote:
>> Weibing Xiao has updated the pull request incrementally with one additional commit since the last revision:
>>
>> update the test code
>
> src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java line 369:
>
>> 367: }
>> 368: }
>> 369: } catch (Exception e) {
>
> The code wrapped in this try-catch block can throw unchecked exceptions, for example `SecurityException` thrown by `Socket.connect`. For such cases the newly created socket remain open.
But the catch is on generalized Exception, and SecutityException is a subclass, so it is covered, n'est-ce pas?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15294#discussion_r1296515618
More information about the core-libs-dev
mailing list