Java 8 Lambda bug report

Brian Goetz brian.goetz at oracle.com
Wed Jan 23 09:42:55 PST 2013


Thanks for the report.  We'll toss this into the stewpot.

On 1/23/2013 12:39 PM, Luke De Gruchy wrote:
> Hi,
>
> I've been testing Java 8 lambda build 74 and I'm not sure what the
> correct way is to file a bug report. Let me know if I should file this
> bug on Oracle's site instead, of if there's another proper way of doing
> this.
>
> I'm installed the Java 8 lambda build from
> lambda-8-b74-linux-x64-21_jan_2013.tar.gz on RHEL 6.
> I was able to replicate the same bug with an OS X Mountain Lion (all
> latest updates applied) machine with a less current lambda build.
>
> Here is my program.  I'm not sure if this syntax is meant to be legal,
> but I'm getting a NullPointerException on com.sun.tools.javac.jvm.Code,
> which is clearly a bug.
>
> *public interface WithSubFunctions {**
> **    default void doStuff() {**
> **        System.out.println("Doing Stuff!");**
> **        RUNNABLE.run();**
> **    }**
> **
> **    static final Runnable RUNNABLE = () -> (
> System.out.println("RUNNABLE!") );**
> **}*
>
> If I change RUNNABLE to an anonymous inner class, it compiles cleanly.
>
> Here's the output when I try to compile with that build's javac:
>
> *$ ~/Development/java/jdks/jdk1.8.0/bin/javac WithSubFunctions.java **
> **An exception has occurred in the compiler (1.8.0-ea). Please file a
> bug at the Java Developer Connection
> (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade
> for duplicates. Include your program and the following diagnostic in
> your report.  Thank you.**
> **java.lang.NullPointerException**
> **    at com.sun.tools.javac.jvm.Code.emitop0(Code.java:538)**
> **    at com.sun.tools.javac.jvm.Items$SelfItem.load(Items.java:367)**
> **    at com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:912)**
> **    at com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1746)**
> **    at
> com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1412)**
> **    at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:893)**
> **    at com.sun.tools.javac.jvm.Gen.visitAssign(Gen.java:1844)**
> **    at com.sun.tools.javac.tree.JCTree$JCAssign.accept(JCTree.java:1619)**
> **    at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:893)**
> **    at com.sun.tools.javac.jvm.Gen.visitExec(Gen.java:1694)**
> **    at
> com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1242)**
> **    at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:683)**
> **    at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:718)**
> **    at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:704)**
> **    at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:755)**
> **    at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1090)**
> **    at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:854)**
> **    at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:683)**
> **    at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:718)**
> **    at com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:968)**
> **    at com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:941)**
> **    at
> com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:738)**
> **    at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:683)**
> **    at com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2310)**
> **    at
> com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:752)**
> **    at
> com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1547)**
> **    at
> com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1511)**
> **    at
> com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:908)**
> **    at
> com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:867)**
> **    at com.sun.tools.javac.main.Main.compile(Main.java:506)**
> **    at com.sun.tools.javac.main.Main.compile(Main.java:365)**
> **    at com.sun.tools.javac.main.Main.compile(Main.java:354)**
> **    at com.sun.tools.javac.main.Main.compile(Main.java:345)**
> **    at com.sun.tools.javac.Main.compile(Main.java:76)**
> **    at com.sun.tools.javac.Main.main(Main.java:61)**
> **
> *
>


More information about the lambda-dev mailing list