You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Sandro Martini (JIRA)" <ji...@apache.org> on 2017/06/18 00:13:00 UTC
[jira] [Resolved] (PIVOT-968) Use try-with-resources
[ https://issues.apache.org/jira/browse/PIVOT-968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sandro Martini resolved PIVOT-968.
----------------------------------
Resolution: Implemented
> Use try-with-resources
> ----------------------
>
> Key: PIVOT-968
> URL: https://issues.apache.org/jira/browse/PIVOT-968
> Project: Pivot
> Issue Type: Improvement
> Components: core-io, core-serialization, wtk, wtk-terra
> Affects Versions: 2.1
> Environment: All
> Reporter: Roger Whitcomb
> Assignee: Roger Whitcomb
> Priority: Minor
> Fix For: 2.1, 2.1.0
>
> Attachments: resources.diffs
>
>
> Java 7 introduced a "try-with-resources" statement that automatically calls the "close()" method for resources that implement the (new) AutoCloseable interface, which includes most/all I/O related objects, and more. Pivot could benefit internally with more readable / maintainable code using this construct. Since Java 7 is now required for the 2.1 (and later) releases, this is a reasonable step to upgrade the code internally (see PIVOT-895).
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)