JDK-8053906 : javac is accepting a self-referencing variable initializer inside a lambda expression
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8,9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-07-29
  • Updated: 2015-09-10
  • Resolved: 2015-08-11
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 b78Fixed
Related Reports
Relates :  
Description
This test case:

class Tmp
{
    final FunctionalInterface notInitialized = ()-> {
            FunctionalInterface simpleVariable = () -> notInitialized.foo();
    };
}

interface FunctionalInterface {
    void foo();
}

should be rejected by javac as notInitialized is being used in the initializer

reported by Ella Nekipelova
Comments
Priority changed from [P4] to [P3]. There are TCK tests which are affected with this bug, and they are now put in the exclude list. All JDK issue mentioned in KFL should have priority P1-P3.
10-09-2014