JDK-7013420 : Project Coin: remove general expression support from try-with-resources statement
  • Type: Bug
  • Component: specification
  • Sub-Component: language
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-01-20
  • Updated: 2017-05-16
  • Resolved: 2011-02-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b130Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Discussion with the JSR 334 expert group has determined it is neither necessary nor desirable to support the general expression form of try-with-resources in JDK 7.  That is the form:

	try(Expression) {...}

rather than

	try(ResourceType resourceVariable = Expression)

Support for this should be removed from the specification and compiler.

Comments
PUBLIC COMMENTS See http://hg.openjdk.java.net/jdk7/tl/langtools/rev/7f8794f9cc14
26-01-2011

EVALUATION A fine idea.
20-01-2011