On Wed, 16 Aug 2023 22:57:55 GMT, Mark Sheppard <[email protected]> wrote:
>> 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?
Thanks Mark. Correct - SecurityException is a subclass of Exception, scratch my
previous comment. We just need to double check `catch Exception` covers all
thrown exception types in this code block.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15294#discussion_r1297053493