Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4250457

InputStream.read() contains undocumented behaviour when interrupted

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      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)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vasya Vassili Igouchkine (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: