JDK-8027258 : Permit a single source annotation to generate multiple bytecode annotations
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-10-24
  • Updated: 2014-07-10
  • Resolved: 2014-06-06
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 b19Fixed
Description
The current implementation does not easily support the case where a single source annotation should give rise to multiple bytecode annotations.  In the following code:

interface Thing {}
public class Test {
    public Thing meth() { return new @X Thing() {}; }
}

There should be a bytecode annotation for the superclass of Thing$1 (the anonymous class), the new, and the constructor invocation.
Comments
8-defer-request: See parent task for justification.
29-10-2013