JDK-7020044 : Project Coin: diamond erroneous allowed on some anonymous inner classes
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-02-16
  • Updated: 2017-05-16
  • Resolved: 2011-04-20
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 b134Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
The diamond specification forbids using diamond with anonymous inner classes; however, the compiler allows this in some cases.

Comments
SUGGESTED FIX A webrev for this fix is available at the following URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/ca32f2986301
07-03-2011

EVALUATION Will remove check for non-denotable types inferred in diamond and will add check to reject diamond with anonymous inner classes.
18-02-2011