[JAVA_STATE_MANAGEMEN-1] Clarify JDK Version Dependency Created: 19/Apr/12  Updated: 19/Apr/12

Status: Open
Project: java-state-managemen
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: keilw Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Java SE

Tags: jdk7-applicable, language, version


The API interface javax.state.Closeable raises the valid question, if the recently added java.lang.AutoCloseable interface could be extended there, too.
The only reason not to do so, would be if strict backward-compatibility with Java 6 or earlier was desired.
Otherwise using AutoCloseable would add value of the new Java 7 try-with-resources block being applicable to the spec.

The only difference is, that try-with-resources requires the close() method to throw an exception, the current close() method in the interface doesn't. Not sure, if this was a big show-stopper, but the value of using some new Java 7+ functionality might justify such tweak.

Other JSRs, though they have mostly become of the core Java package also picked up AutoCloseable, e.g. javax.sound.midi.Transmitter.

Generated at Tue Feb 28 03:41:14 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.