Duplicate :
|
Name: ss24420 Date: 03/26/2004 Compiling this code: @interface A { Class value() default void.class; } leads to: An exception has occurred in the compiler (1.5.0-beta2). Please file a bug... java.lang.NullPointerException at com.sun.tools.javac.code.Types.erasure(Types.java:1722) at com.sun.tools.javac.code.Symbol$ClassSymbol.erasure(Symbol.java:561) at com.sun.tools.javac.code.Attribute$Class.makeClassType(Attribute.java:61) at com.sun.tools.javac.code.Attribute$Class.<init>(Attribute.java:57) at com.sun.tools.javac.comp.Annotate.enterAttributeValue(Annotate.java:195) at com.sun.tools.javac.comp.MemberEnter.enterDefaultValue(MemberEnter.java:721) ... ClassSymbol.erasure(Types) makes the assumption that type.outer() isn't null. It is null in this case. (Who'd have thought we'd be erasing void?) ======================================================================