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

Project Coin: javac warnings for AutoCloseable.close throwing InterruptedException

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • P3
    • Resolution: Fixed
    • 7
    • 7
    • tools
    • b138
    • generic
    • generic
    • Verified

    Description

      The JSR 334 expert group has decided that it is probably a programming error is an AutoCloseable.close method throws InterruptedException since InterruptedException interacts with a thread's interrupted status. A suppressed InterruptedException is likely to lead to misbehavior at runtime.

      To catch such conceptual mistakes, it would be helpful is javac warned about structures like "public void close throws InterruptedException {...}"

      Attachments

        Issue Links

          Activity

            People

              mcimadamore Maurizio Cimadamore
              darcy Joe Darcy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: