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

Project Coin: improvements to try-with-resources desugaring

    Details

    • Subcomponent:
    • Resolved In Build:
      b116
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      Various improvements to the javac implementation of the try-with-resources desugaring have been suggested:

      1) Generate a per-class helper method to encapsulate the if-primary-exception not-null... logic of the synthesized finally block. (Unfortunately, such code cannot be shared in a common library method because the more precise exception information cannot be captured in the method's signature.)

      2) From coin-dev ( http://mail.openjdk.java.net/pipermail/coin-dev/2011-February/003079.html ), omit the null-check on a resource if the resource is initialized with a constructor call since constructors cannot return null.

      These should be considered in the future.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jlahoda Jan Lahoda
                Reporter:
                darcy Joe Darcy
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: