Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5040853

compiler crashes with void.class annotation default

XMLWordPrintable

    • b51
    • generic
    • solaris_8

      ==========$ cat -n T.java
           1 @interface A {
           2 Class value() default void.class;
           3 }
      ==========$ newjavac T.java
      + exec /usr/j2sdk1.5.0/bin/javac -J-esa -source 1.5 -target 1.5 -XDdev T.java
      An exception has occurred in the compiler (1.5.0-internal). 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.code.Types.erasure(Types.java:1552)
              at com.sun.tools.javac.code.Symbol$ClassSymbol.erasure(Symbol.java:562)
              at com.sun.tools.javac.code.Attribute$Class.makeClassType(Attribute.java:62)
              at com.sun.tools.javac.code.Attribute$Class.<init>(Attribute.java:58)
              at com.sun.tools.javac.comp.Annotate.enterAttributeValue(Annotate.java:195)
              at com.sun.tools.javac.comp.MemberEnter.enterDefaultValue(MemberEnter.java:741)
              at com.sun.tools.javac.comp.MemberEnter.access$400(MemberEnter.java:39)
              at com.sun.tools.javac.comp.MemberEnter$6.enterAnnotation(MemberEnter.java:729)
              at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:94)
              at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:86)
              at com.sun.tools.javac.comp.Enter.complete(Enter.java:447)
              at com.sun.tools.javac.comp.Enter.main(Enter.java:403)
              at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:382)
              at com.sun.tools.javac.main.Main.compile(Main.java:592)
              at com.sun.tools.javac.main.Main.compile(Main.java:544)
              at com.sun.tools.javac.Main.compile(Main.java:58)
              at com.sun.tools.javac.Main.main(Main.java:48)
      ==========$

            gafter Neal Gafter (Inactive)
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: