groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wagenleitner (JIRA)" <>
Subject [jira] [Resolved] (GROOVY-8251) Implement withCloseable on AutoCloseable
Date Tue, 18 Jul 2017 02:01:05 GMT


John Wagenleitner resolved GROOVY-8251.
       Resolution: Fixed
         Assignee: John Wagenleitner
    Fix Version/s: 2.5.0-beta-2

Thanks for reporting the issue.  The {{withAutoCloseable}} method has been moved from the
NIO subproject to core and renamed {{withCloseable}} to be consistent with the existing method
for {{}}.

> Implement withCloseable on AutoCloseable
> ----------------------------------------
>                 Key: GROOVY-8251
>                 URL:
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-jdk
>    Affects Versions: 2.5.0-beta-1
>            Reporter: Henri Tremblay
>            Assignee: John Wagenleitner
>             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

View raw message