cannot distinguish Thread.interrupt and Socket.setSoTimeout exceptions

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 1.4.0
    • Affects Version/s: 1.1.1, 1.1.6, 1.2.0
    • Component/s: core-libs
    • None
    • beta
    • generic, x86
    • generic, windows_nt

      When Socket.setSoTimeout is used, it is impossible to distinguish between an InterruptedIOException that results from a socket timeout, and an InterruptedIOException that results from a Thread.interrupt. This is particularly problematic given the fact that once the exception is caught, Thread.interrupted() will be false (which is itself a bad design decision).
      There needs to be a way to distinguish between these two cases, as they often want to be handled differently by the application.

            Assignee:
            Michael McMahon
            Reporter:
            Bob Scheifler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: