Java 8 Lambda bug report
Luke De Gruchy
luke.degruchy at intelerad.com
Wed Jan 23 09:39:06 PST 2013
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)**
**
*
--
Luke de Gruchy
Senior Software Developer
Intelerad Medical Systems Incorporated
895 de la Gauchetiere W, Suite 400
Montreal, Quebec, Canada H3B 4G1
luke.degruchy at intelerad.com
www.intelerad.com
--
This email or any attachments may contain confidential or legally
privileged information intended for the sole use of the addressees. Any
use, redistribution, disclosure, or reproduction of this information,
except as intended, is prohibited. If you received this email in error,
please notify the sender and remove all copies of the message, including
any attachments.
More information about the lambda-dev
mailing list