A DESCRIPTION OF THE PROBLEM :
PrintStream's handling of InterruptedIOExceptions is documented for `java.io.PrintStream.checkError()`; PrintWriter behaves exactly the same, but the behavior is **not** documented.
This has also been mentioned in https://bugs.openjdk.java.net/browse/JDK-4329256?focusedCommentId=12138648&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12138648.
That comment also notes that PrintStream and PrintWriter.flush() and close() do not handle InterruptedIOExceptions, so either that should be fixed (preferred?) or the documentation for `checkError()` of PrintStream and PrintWriter should be adjusted to mention that. Currently it says "If an operation on the underlying output stream throws an InterruptedIOException", and a user would expect that "an operation" also covers `flush()` and `close()`.
PrintStream's handling of InterruptedIOExceptions is documented for `java.io.PrintStream.checkError()`; PrintWriter behaves exactly the same, but the behavior is **not** documented.
This has also been mentioned in https://bugs.openjdk.java.net/browse/JDK-4329256?focusedCommentId=12138648&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12138648.
That comment also notes that PrintStream and PrintWriter.flush() and close() do not handle InterruptedIOExceptions, so either that should be fixed (preferred?) or the documentation for `checkError()` of PrintStream and PrintWriter should be adjusted to mention that. Currently it says "If an operation on the underlying output stream throws an InterruptedIOException", and a user would expect that "an operation" also covers `flush()` and `close()`.
- csr for
-
JDK-8282135 PrintWriter handling of InterruptedIOException should be removed
-
- Closed
-