Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8251

Implement withCloseable on AutoCloseable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0-beta-1
    • Fix Version/s: 2.5.0-beta-2
    • Component/s: groovy-jdk
    • Labels:
      None

      Description

      The Groovy implementation of try-with-resource is through withCloseable(). The problem is that withCloseable only exists for classes implementing the Closeable interface.

      But a try-with-resource works with the AutoCloseable interface. So withCloseable should probably be moved on step below to AutoCloseable (that Closeable extends).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jwagenleitner John Wagenleitner
                Reporter:
                henri Henri Tremblay
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: