JDK-8029721 : javac crash for annotated parameter type of lambda in a field
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-12-07
  • Updated: 2015-05-12
  • Resolved: 2013-12-13
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 8 JDK 9
8 b122Fixed 9Fixed
Related Reports
Duplicate :  
Relates :  
Description
See http://mail.openjdk.java.net/pipermail/type-annotations-dev/2013-December/001456.html. A fix exists in type-annotations/langtools.

Note that the crash arises from the interaction of features from two JSRs: assigning a lambda expression to a field (JSR 335), and annotating the parameter type of the lambda expression (JSR 308).
Comments
Release team: Approved for fixing
11-12-2013

8-critical-request justification: This fix should be included for 8 as this is a conformance issue and a compiler crash. Risk Assessment: Low, this issue is in the border between two new features: lambda and type annotations. The fix reuses already existing infrastructures so the risk is low but not minimal because of possible interactions between both features. Level of testing coverage: JCK tests, langtools jtreg tests executed through jprt in all available platforms, build whole JDK with the change applied. Size of fix: ~150 LOC, including jtreg tests.
09-12-2013

The crash is reproducible with static fields too.
09-12-2013

Vicente filled JDK-8029787 for (presumably) the same case. Assigning to Vicente for now, please reassign back or to someone else if appropriate.
09-12-2013

Full test case: import java.lang.annotation.ElementType; import java.lang.annotation.Target; interface IntUnaryOperator { Integer apply(Integer i); } class Test { IntUnaryOperator x = (@TA Integer y) -> y + 1; } @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) @interface TA { }
09-12-2013