You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2018/03/06 23:26:12 UTC

[jira] [Closed] (GROOVY-8251) Implement withCloseable on AutoCloseable

     [ https://issues.apache.org/jira/browse/GROOVY-8251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King closed GROOVY-8251.
-----------------------------

> Implement withCloseable on AutoCloseable
> ----------------------------------------
>
>                 Key: GROOVY-8251
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8251
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-jdk
>    Affects Versions: 2.5.0-beta-1
>            Reporter: Henri Tremblay
>            Assignee: John Wagenleitner
>            Priority: Major
>             Fix For: 2.5.0-beta-2
>
>
> 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).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)