Issue 17415: Implement java.io.Closeable in Sample.Iterator (dds-psm-java-ftf) Source: Real-Time Innovations (Dr. Sumant Tambe, sumant(at)rti.com) Nature: Clarification Severity: Minor Summary: Java 7 has a try-with-resources construct that allows a close() method to be called automatically when a certain code block ends. Java PSM can support this construct with sample loans in a way that's backwards compatible with Java 5. All we have to do is to rename the Sample.Iterator.returnLoan() method to close() and make Sample.Iterator implement the interface java.io.Closeable. Note: java.lang.AutoCloseable is available only since 1.7 Resolution: Revised Text: Actions taken: June 8, 2012: received issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 08 Jun 2012 14:13:02 -0400 To: Subject: Issue/Bug Report ******************************************************************************* Name: Sumant Tambe Employer: Real-Time Innovations mailFrom: sumant@rti.com Terms_Agreement: I agree Specification: DDS-JAVA-PSM Section: 7 FormalNumber: ptc/12-01-04 Version: FTF Beta 2 Doc_Year: Year Doc_Month: Month Doc_Day: Day Page: 14 Title: Implement java.io.Closeable in Sample.Iterator Nature: Clarification Severity: Minor CODE: 3TMw8 B1: Report Issue Description: Java 7 has a try-with-resources construct that allows a close() method to be called automatically when a certain code block ends. Java PSM can support this construct with sample loans in a way that's backwards compatible with Java 5. All we have to do is to rename the Sample.Iterator.returnLoan() method to close() and make Sample.Iterator implement the interface java.io.Closeable. Note: java.lang.AutoCloseable is available only since 1.7