[
https://issues.apache.org/jira/browse/NET-594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brad Worrall updated NET-594:
-----------------------------
Description:
As part of fixing an existing bug Oracle introduced a new bug into
FilterOutputStream.close:
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8054565
While the bug is marked as fixed the fix will not be available until Java 9
from what I can tell and is not in the latest release as of writing (1.8.91)
This bug can also be reproduced through remote socket closure.
Due to this bug the TelnetClient when calling disconnect() throws an unhandled
exception and is unable to close the connection, if the socket was remotely
closed.
Stack Trace:
java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:121)
at java.net.SocketOutputStream.write(SocketOutputStream.java:147)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at java.io.FilterOutputStream.close(FilterOutputStream.java:159)
at
org.apache.commons.net.telnet.TelnetClient._closeOutputStream(TelnetClient.java:86)
at
org.apache.commons.net.telnet.TelnetOutputStream.close(TelnetOutputStream.java:155)
at
org.apache.commons.net.telnet.TelnetClient.disconnect(TelnetClient.java:127)
was:
As part of fixing an existing bug Oracle introduced a new bug into
FilterOutputStream.close:
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8054565
This bug can also be reproduced through remote socket closure.
Due to this bug the TelnetClient when calling disconnect() throws an unhandled
exception and is unable to close the connection, if the socket was remotely
closed.
Stack Trace:
java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:121)
at java.net.SocketOutputStream.write(SocketOutputStream.java:147)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at java.io.FilterOutputStream.close(FilterOutputStream.java:159)
at
org.apache.commons.net.telnet.TelnetClient._closeOutputStream(TelnetClient.java:86)
at
org.apache.commons.net.telnet.TelnetOutputStream.close(TelnetOutputStream.java:155)
at
org.apache.commons.net.telnet.TelnetClient.disconnect(TelnetClient.java:127)
> TelnetClient._closeOutputStream unhandled exception from
> FilterOutputStream.close
> ---------------------------------------------------------------------------------
>
> Key: NET-594
> URL: https://issues.apache.org/jira/browse/NET-594
> Project: Commons Net
> Issue Type: Bug
> Components: Telnet
> Affects Versions: 3.4
> Environment: Windows 7 64bit
> Reporter: Brad Worrall
>
> As part of fixing an existing bug Oracle introduced a new bug into
> FilterOutputStream.close:
> http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8054565
> While the bug is marked as fixed the fix will not be available until Java 9
> from what I can tell and is not in the latest release as of writing (1.8.91)
> This bug can also be reproduced through remote socket closure.
> Due to this bug the TelnetClient when calling disconnect() throws an
> unhandled exception and is unable to close the connection, if the socket was
> remotely closed.
> Stack Trace:
> java.net.SocketException: Socket closed
> at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:121)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:147)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
> at java.io.FilterOutputStream.close(FilterOutputStream.java:159)
> at
> org.apache.commons.net.telnet.TelnetClient._closeOutputStream(TelnetClient.java:86)
> at
> org.apache.commons.net.telnet.TelnetOutputStream.close(TelnetOutputStream.java:155)
> at
> org.apache.commons.net.telnet.TelnetClient.disconnect(TelnetClient.java:127)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)