[GitHub] groovy pull request #572: GROOVY-8251: Implement withCloseable on AutoClosea...

2017-07-17 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/groovy/pull/572


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] groovy pull request #572: GROOVY-8251: Implement withCloseable on AutoClosea...

2017-07-08 Thread jwagenleitner
GitHub user jwagenleitner opened a pull request:

https://github.com/apache/groovy/pull/572

GROOVY-8251: Implement withCloseable on AutoCloseable

`NioGroovyMethods.withAutoCloseable` was added for 2.5.0 as part of 
[GROOVY-7572](https://issues.apache.org/jira/browse/GROOVY-7572).  It appears 
it was originally placed here because at the time Java 6 was still used, but 
now 2.5.0 is 7+.

First commit proposes moving the method (as-is) into the core 
`IOGroovyMethods` class.  This is where the 
`withCloseable(java.io.Closeable...)` method is, so also part of this change is 
moving the tests for it from NIO to core.  Since 2.5.0 is not been officially 
released I don't think there is a need to deprecate or worry about binary 
compatibility for the `withAutoCloseable` method.

Second commit proposes to rename the new but unreleased method from 
`withAutoCloseable` to `withCloseable` to match the existing method on 
`java.io.Closeable`.  See discussion on 
[GROOVY-8251](https://issues.apache.org/jira/browse/GROOVY-8251).

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jwagenleitner/groovy 8251-AutoCloseable

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/572.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #572


commit 912200153193849fc35a09a053898d46c7f1dacd
Author: John Wagenleitner 
Date:   2017-07-09T00:22:36Z

GROOVY-8251: Implement withCloseable on AutoCloseable

Relocate withAutoCloseable from NIO subproject to core. Since
AutoCloseable is not an NIO related class and release 2.5.0
will target Java 7, the method should be available as part
of core.

Relocated withCloseable tests to core since that method
is deprecated in the NIO module.

commit 261bc174980da8d6b6f4cdb54b8f0ab98c64c4fd
Author: John Wagenleitner 
Date:   2017-07-09T01:13:48Z

GROOVY-8251: rename withAutoCloseable to withCloseable




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---