This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: java.io.PrintStream - PR/13176


Hi,

On Sun, 2003-12-07 at 01:32, Bryce McKinlay wrote:

> PrintStream methods must catch InterruptedIOException because its a 
> checked exception. On the other hand, the docs for checkError state 
> that "The internal error state is set to true when the underlying 
> output stream throws an IOException other than InterruptedIOException 
> ...".

Interesting. The Class Library Books say nothing about
InterruptedIOException at all. It just says that any IOException makes
checkError() return true. Your documentation seems to indicate that
InterruptedIOExceptions are special, but don't mention anything about
the interrupted status of the Thread. But checking the online 1.4.1 docs
for checkError() on java.sun.com seem to indicate that the original code
was actually correct: "The internal error state is set to true when the
underlying output stream throws an IOException other than
InterruptedIOException, and when the setError method is invoked. If an
operation on the underlying output stream throws an
InterruptedIOException, then the PrintStream converts the exception back
into an interrupt by doing Thread.currentThread().interrupt(); or the
equivalent."

Sigh. I am sorry I brought this up. Clearly there isn't a consensus on
this point. Having a real spec for the core class libraries would be
nice... Maybe we need a Mauve test for this. 

But for now I think we should go for Michael his original patch since it
does fix a regression.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]