Name: vi73552 Date: 06/29/99
- The documentation of the method read-methods of
java.io.InputStream dos not explain what happens,
if a thread is blocked in read and another thread
send interrupt() to the blocked thread.
- Unter Linux/JDK 1.1.6 and Win95/1.2 read ends with
-1 as result. Bad: The -1 stands for EOF. But an
interrupt isn't EOF!!!!
- Unter Solaris/JDK1.2.1 the read is interrupted with
an IOException with message "Interrupted systen call".
Bad: A interrupt isn't a I/O-Error!!!
I thing this is the correct solution: InterruptedException
should extend RuntimeExeption, so read can throw these
Exception. interrupt to an blocked read should throw
InterruptedException.
At least you should define a uniq behaviour in the
documentation.
Write once, run everwhere....
(Review ID: 84964)
======================================================================
- The documentation of the method read-methods of
java.io.InputStream dos not explain what happens,
if a thread is blocked in read and another thread
send interrupt() to the blocked thread.
- Unter Linux/JDK 1.1.6 and Win95/1.2 read ends with
-1 as result. Bad: The -1 stands for EOF. But an
interrupt isn't EOF!!!!
- Unter Solaris/JDK1.2.1 the read is interrupted with
an IOException with message "Interrupted systen call".
Bad: A interrupt isn't a I/O-Error!!!
I thing this is the correct solution: InterruptedException
should extend RuntimeExeption, so read can throw these
Exception. interrupt to an blocked read should throw
InterruptedException.
At least you should define a uniq behaviour in the
documentation.
Write once, run everwhere....
(Review ID: 84964)
======================================================================
- relates to
-
JDK-4385444 (spec) InterruptedIOException should not be required by platform specification (sol)
- Closed