On Wed, 9 Aug 2023 00:21:55 GMT, Weibing Xiao <d...@openjdk.org> wrote:

>> com.sun.jndi.ldap.Connection::leanup does not close the underlying socket if 
>> the is an IOException generation when the output stream was flushing the 
>> buffer.
>> 
>> Please refer to the bug https://bugs.openjdk.org/browse/JDK-8313657.
>
> Weibing Xiao has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   update method name and test case

test/jdk/com/sun/jndi/ldap/SocketCloseTest.java line 118:

> 116:         private LdapOutputStream los;
> 117:         private ByteArrayInputStream bos;
> 118:         int pos = 0;

variable 'pos' is not used can be removed.

test/jdk/com/sun/jndi/ldap/SocketCloseTest.java line 127:

> 125:         public int read() throws IOException {
> 126:             bos = new ByteArrayInputStream(BIND_RESPONSE);
> 127:             int next = bos.read();

can be simplified as follows return bos.read();

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15143#discussion_r1287907584
PR Review Comment: https://git.openjdk.org/jdk/pull/15143#discussion_r1287908154

Reply via email to