Project Coin: Trying out try-with-resources in the JDK

As part of the "coinification" the JDK libraries, after first forging some diamonds, Stuart has been working on introducing systematic usage of try-with-resources into the JDK code base. Initially, this effort introduced try-with-resources in URLJarFile.java and in javax.sql; more changes are on the way.

Besides directly improving the code base, these efforts also help inform design decisions about how to make the feature more useful in practice.

The try-with-resources statement can also be helpful in new code. In a recent update to the file system API portion of JSR 203, try-with-resources is used throughout the utility methods in java.nio.file.Files and in other portions of the code and tests for JSR 203.

There is a limited amount of time remaining to make adjustments to try-with-resources in JDK 7. Additional reports on experiences using try-with-resources, and other Project Coin features, would be helpful, either to report issues or validate the current design and implementation. For widest discussion, feedback can be sent to the coin-dev alias.

Comments:

Post a Comment:
Comments are closed for this entry.
About

darcy

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News

No bookmarks in folder

Blogroll