[
https://issues.apache.org/jira/browse/JDO-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15696378#comment-15696378
]
Michael Bouschen commented on JDO-735:
--------------------------------------
Need a tck test for try-with-resources for Extent, and Query. Maybe
org.apache.jdo.tck.extents.AutoCloseable.java
org.apache.jdo.tck.query.api.AutoCloseable.java
The test class for PersistenceManager is pretty simple with no error cases. We
should think about adding some cases where the test() method throws an
exception and make sure the PM is closed:
org.apache.jdo.tck.api.persistencemanager.close.AutoCloseable.java
> Make PersistenceManager and Query support AutoCloseable (JDK1.7+)
> -----------------------------------------------------------------
>
> Key: JDO-735
> URL: https://issues.apache.org/jira/browse/JDO-735
> Project: JDO
> Issue Type: New Feature
> Components: api, specification, tck
> Reporter: Andy Jefferson
> Assignee: Michael Bouschen
> Fix For: JDO 3.2
>
> Attachments: CloseWithActiveTxRollsBack.java
>
>
> So then it can be used with JDK1.7+ try-with-resources, as per
> http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)