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

Project Coin: javac warnings for AutoCloseable.close throwing InterruptedException

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b138
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: