You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Roger Whitcomb (JIRA)" <ji...@apache.org> on 2015/06/11 02:27:00 UTC

[jira] [Commented] (PIVOT-968) Use try-with-resources internally now that Java 7 is required

    [ https://issues.apache.org/jira/browse/PIVOT-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14581276#comment-14581276 ] 

Roger Whitcomb commented on PIVOT-968:
--------------------------------------

Committed these changes in "trunk":
Sending        tutorials\src\org\apache\pivot\tutorials\bxmlexplorer\BXMLExplorerDocument.java
Sending        tutorials\src\org\apache\pivot\tutorials\databinding\DataBinding.java
Sending        web\src\org\apache\pivot\web\Query.java
Sending        web-server\src\org\apache\pivot\web\server\ProxyServlet.java
Sending        web-server\src\org\apache\pivot\web\server\QueryServlet.java
Sending        wtk\src\org\apache\pivot\wtk\ApplicationContext.java
Sending        wtk\src\org\apache\pivot\wtk\TextArea.java
Sending        wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraTheme.java
Transmitting file data ........
Committed revision 1684802.


> Use try-with-resources internally now that Java 7 is required
> -------------------------------------------------------------
>
>                 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
>
>         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.3.4#6332)