JDK-8010006 : NPE in javac with interface super in lambda
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-03-13
  • Updated: 2013-06-06
  • Resolved: 2013-05-15
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
8 b91Fixed
Description
With the proposed changes to generate lambda methods as private interface methods (changes attached as patch that Robert Field provided), javac crashes during compilation of the following test case provided in JDK-8006267.

<test_code>

interface Sup {
    default void m() { }
}

interface I extends Sup {
   default void m() {
        Runnable r = ()-> { Sup.super.m(); }; //the plan is to generate a private instance synthetic method for translating this lambda away
        r.run();
   }
}

class ImplI implements I {}

class TestTwo {
    public static void main(String[] args) {
        ImplI mi = new ImplI();
        mi.m();
    }
}

</test_code>

Comments
verified in jdk8 b92
06-06-2013

Sup.super.m was not being recognized as needing an instance context
15-05-2013

Reproducible even after the fix for almost identical looking NPE failures. Most likely, this is the super.
14-05-2013