Re: RFR: 8254574: PrintWriter handling of InterruptedIOException is not documented

2022-02-17 Thread Brian Burkhalter
On Wed, 16 Feb 2022 22:32:21 GMT, Brian Burkhalter  wrote:

> Remove reference to `java.io.InterruptedIOException` from 
> `java.io.PrintStream`, and make the specifications of `checkError()`, 
> `setError()`, and `clearError()` consistent between `java.io.PrintStream` and 
> `java.io.PrintWriter`.

Thanks. I was holding off on that label until the PR approached consensus.

-

PR: https://git.openjdk.java.net/jdk/pull/7507


Re: RFR: 8254574: PrintWriter handling of InterruptedIOException is not documented

2022-02-16 Thread Alan Bateman
On Wed, 16 Feb 2022 22:32:21 GMT, Brian Burkhalter  wrote:

> Remove reference to `java.io.InterruptedIOException` from 
> `java.io.PrintStream`, and make the specifications of `checkError()`, 
> `setError()`, and `clearError()` consistent between `java.io.PrintStream` and 
> `java.io.PrintWriter`.

I think looks okay, we should have removed that text from checkError's javadoc 
a long time ago. I've added the "csr" label to the PR as this is a spec change 
that should be tracked.

-

Marked as reviewed by alanb (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7507


Re: RFR: 8254574: PrintWriter handling of InterruptedIOException is not documented

2022-02-16 Thread Brian Burkhalter
On Wed, 16 Feb 2022 22:32:21 GMT, Brian Burkhalter  wrote:

> Remove reference to `java.io.InterruptedIOException` from 
> `java.io.PrintStream`, and make the specifications of `checkError()`, 
> `setError()`, and `clearError()` consistent between `java.io.PrintStream` and 
> `java.io.PrintWriter`.

In the various methods which print there is still this sort of construct

try {
// print operation which can throw IOException
}
catch (InterruptedIOException x) {
Thread.currentThread().interrupt();
}
catch (IOException x) {
trouble = true;
}

where an `InterruptedIOException` causes the current thread to be interrupted. 
Should this PR also excise these interrupts (as vestigial)? There is no longer 
any description of this in the specifications of the two print stream classes 
although in theory an, e.g., `OutputStream` which throws 
`InterruptedIOException` could be passed in.

-

PR: https://git.openjdk.java.net/jdk/pull/7507


RFR: 8254574: PrintWriter handling of InterruptedIOException is not documented

2022-02-16 Thread Brian Burkhalter
Remove reference to `java.io.InterruptedIOException` from 
`java.io.PrintStream`, and make the specifications of `checkError()`, 
`setError()`, and `clearError()` consistent between `java.io.PrintStream` and 
`java.io.PrintWriter`.

-

Commit messages:
 - 8254574: PrintWriter handling of InterruptedIOException is not documented

Changes: https://git.openjdk.java.net/jdk/pull/7507/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=7507=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8254574
  Stats: 21 lines in 2 files changed: 0 ins; 11 del; 10 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7507.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7507/head:pull/7507

PR: https://git.openjdk.java.net/jdk/pull/7507