JDK-8062373 : Project Coin: diamond and anonymous classes
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7-pool,8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-10-29
  • Updated: 2017-08-28
  • Resolved: 2015-03-31
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 9
9 b59Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8073593 :  
Description
At some point, during JDK 7 development, the following changeset:

http://hg.openjdk.java.net/jdk7/jdk7/langtools/rev/ca32f2986301

Allowed diamond syntax to be used in conjunction with anonymous inner classes. That change has been backed out for scoping reasons. It is now time to re-enable it, as the analysis in JDK-8058519 shows that such a simple approach - together with the more powerful JDK 8 inference, could indeed be beneficial in the vast majority of cases.

Comments
@Victor, As we are approaching end game, it would help a lot if you are able to confirm that the 177 JCK tests tagged as "failing" above are all harmless failures that simply call for remastering the tests (i.e turning them from being negative tests into positive tests), See the failure mode is uniformly "Failed. compilation did not fail as expected". I did sample a few of those to confirm that they need to be turned into positive tests for JDK 9 with support for <> and anonymous classes coming in.
24-03-2015