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

(ch) AbstractInterruptibleChannel.end sets interrupted to null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b42
    • Verification:
      Not verified

      Backports

        Description

        Found by inspection and appears to be harmless. AbstractInterruptibleChannel current has:

        if (interrupted != null && interrupted == Thread.currentThread()) {
            interrupted = null;
            throw new ClosedByInterruptException();
        }

        The line interrupted = null should be removed or replaced with "this.interrupted = null". It's only purpose is allow the Thread be GC'ed for cases where the InterruptibleChannel cannot be GC'ed.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                alanb Alan Bateman
                Reporter:
                alanb Alan Bateman
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: