backlogged entry #1

Published August 19, 2005
Advertisement
I broke java! The following code:

class Test{   static public void main(String[] args)   {       HashMap hashmap = new HashMap();       long useless_number = 0;       useless_number += hashmap.get(0);   }}


gave me this error:

An exception has occurred in the compiler (1.5.0-beta). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.ArrayIndexOutOfBoundsException: -1
at com.sun.tools.javac.jvm.Code$State.pop(Code.java:1509)
at com.sun.tools.javac.jvm.Code.emitop1w(Code.java:871)
at com.sun.tools.javac.jvm.Items$LocalItem.store(Items.java:387)
at com.sun.tools.javac.jvm.Items$AssignItem.drop(Items.java:665)
at com.sun.tools.javac.jvm.Gen.visitExec(Gen.java:1599)
at com.sun.tools.javac.tree.Tree$Exec.accept(Tree.java:734)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:651)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:686)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:672)
at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:723)
at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:970)
at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:540)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:651)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:686)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:672)
at com.sun.tools.javac.jvm.Gen.genLoop(Gen.java:1016)
at com.sun.tools.javac.jvm.Gen.visitForLoop(Gen.java:987)
at com.sun.tools.javac.tree.Tree$ForLoop.accept(Tree.java:586)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:651)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:686)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:672)
at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:723)
at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:970)
at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:540)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:651)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:686)
at com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:908)
at com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:844)
at com.sun.tools.javac.tree.Tree$MethodDef.accept(Tree.java:482)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:651)
at com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2177)
at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:325)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:467)
at com.sun.tools.javac.main.Main.compile(Main.java:593)
at com.sun.tools.javac.main.Main.compile(Main.java:545)
at com.sun.tools.javac.Main.compile(Main.java:44)
at com.sun.tools.javac.Main.main(Main.java:35)


WOO. Obviously it has something to do with the new unboxing stuff (the bug doesn't occur if I try to unbox to an int, only to a long). And I guess the compiler is technically a beta version. But still I feel proud.
Previous Entry first post
Next Entry backlogged entry #2
0 likes 2 comments

Comments

evelyn
Welome to Journal land!..have a piece of caek +
August 19, 2005 10:17 AM
pinacolada
thanks!! Man, this is shocking how quickly people respond to journal entries =)
August 19, 2005 10:24 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

check

1138 views

I have a logo!

1119 views

wooo

1070 views

scripting

1182 views

tool overload

1273 views

java svg code

1152 views

svg in java

1149 views
Advertisement