JDK-8255029 : 9.6: Prohibit annotation interface declarations nested in anonymous classes
  • Type: Bug
  • Component: specification
  • Sub-Component: language
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2020-10-19
  • Updated: 2021-01-11
  • Resolved: 2020-10-19
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 16
16Resolved
Related Reports
Relates :  
Description
local-statics-jls prohibits annotation interface declarations from occurring anywhere in the body of a local class.

JDK-8253374 permits static members of inner classes. With this change, it's possible for an annotation interface to be declared as a member of an *anonymous* class, and the rule doesn't prohibit it.

The rule in 9.6 should be updated to disallow nesting in both local classes and anonymous classes.
Comments
My mistake, I guess this was already changed in JDK-8253374.
19-10-2020