On Tue, 17 Feb 2026 14:48:46 GMT, Daniel Fuchs <[email protected]> wrote:

> However, is it possible that close() is called asynchronously?

The `SaslOutputStream` instance gets used by the 
`com.sun.jndi.ldap.Connection`. That `outStream` instance is `close()`d when 
that `Connection` is being closed (`cleanup()` calls 
`flushAndCloseOutputStream()`). Similarly, the `Connection` instance issues 
`outStream.write(...)` calls in a few places. Both the `outStream.close()` and 
`outStream.write(...)` calls are issued when holding the (same) `lock`. So 
there doesn't appear to be any concurrent calls to `close()` and `write(...)` 
on the `SaslOutputStream` instance.

Other than the `Connection` class, from what I can see in the code, the  
`SaslOutputStream` stream instance doesn't get closed or written to.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29647#issuecomment-3915829386

Reply via email to