Project Coin: JSR 334 in Public Review

After successfully going through early draft review, JSR 334 has now entered another phase: public review. Compared to the earlier draft review specification (v0.75), the main changes in the public draft review specification (v0.875) are:

  • The specification for diamond was expanded and clarified. Using diamond on a non-generic class is explicitly forbidden.

  • The specification for multi-catch was expanded and made more precise.

  • Several changes related to the try-with-resources feature:

    • The try-with-resources statement has dropped support for a resource to be given as a general expression without an accompanying explicit variable declaration.

    • An optional trailing semicolon is allowed to terminate the sequence of resources in a resource specification rather than producing a syntax error.

    • The compiler-generated calls to the close method of a resource in a try-with-resources statement only occur if the resource is non-null.

    • Strong warnings were added to the javadoc of AutoCloseable about having the close method throw InterruptedException.

  • The @SafeVarargs annotation was applied to appropriate places in the platform libraries.

  • JLSv3 changes were provided for the simplified varargs method invocation feature.

The public review draft of JSR 334 is the last expected JCP milestone before proposed final draft, so get your comments about the public review in soon!

Comments:

We were told, before this and other JDK 7/8 JSRs started, that the expert group deliberations would take place in a publicly-readable forum. Not only did that not happen, now we are being asked to comment on the resulting draft specification without any reference to the issues and discussion leading to its formation. The record of the discussion would greatly help us in focusing our attention on potential problem areas. Please let me know when Oracle plans to fulfill its commitments to provide that information, and I will then be happy to provide detailed comments.

Posted by Neal Gafter on March 24, 2011 at 09:12 AM PDT #

Looks good. I can't wait to use it all in my code.
Multicatch and Strings in Switch is great!

Also, can't wait for closures. Wish you guys had just copied Groovy on that. They got it right the first time.

Posted by canwilf on March 25, 2011 at 06:14 PM PDT #

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