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

compiling annatations with nested enums issuing *.java leads to crash

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b49
    • CPU:
      generic
    • OS:
      generic

      Description

      In the Pit build Tiger-Beta2 b46
      BugId:- 5008452 is being fixed.
      The fix is working right too.
      if one compiles the annotation first then application
      everything works fine.

      But if one tries to compile both of them together by issuing *.java
      compiler crashes:
      Output:-
      An exception has occurred in the compiler (1.5.0-auto-tiger). 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.comp.Check.validateAnnotation(Check.java:1665)
              at com.sun.tools.javac.comp.Check.validateAnnotation(Check.java:1593)
              at com.sun.tools.javac.comp.Check.validateAnnotations(Check.java:1587)
              at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:2292)
              at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2272)
              at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2245)
              at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2241)
              at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2221)
              at com.sun.tools.javac.comp.Attr.visitClassDef(Attr.java:397)
              at com.sun.tools.javac.tree.Tree$ClassDef.accept(Tree.java:438)
              at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
              at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:291)
              at com.sun.tools.javac.comp.Attr.visitNewClass(Attr.java:1316)
              at com.sun.tools.javac.tree.Tree$NewClass.accept(Tree.java:840)
              at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
              at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:271)
              at com.sun.tools.javac.comp.Attr.evalInit(Attr.java:2058)
              at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:1693)
              at com.sun.tools.javac.tree.Tree$Select.accept(Tree.java:989)
              at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
              at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:271)
              at com.sun.tools.javac.comp.Annotate.enterAttributeValue(Annotate.java:228)
              at com.sun.tools.javac.comp.Annotate.enterAttributeValue(Annotate.java:219)
              at com.sun.tools.javac.comp.Annotate.enterAnnotation(Annotate.java:165)
              at com.sun.tools.javac.comp.MemberEnter.enterAnnotations(MemberEnter.java:684)
              at com.sun.tools.javac.comp.MemberEnter.access$300(MemberEnter.java:39)
              at com.sun.tools.javac.comp.MemberEnter$5.enterAnnotation(MemberEnter.java:665)
              at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:92)
              at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:82)
              at com.sun.tools.javac.comp.Enter.main(Enter.java:394)
              at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:382)
              at com.sun.tools.javac.main.Main.compile(Main.java:586)
              at com.sun.tools.javac.main.Main.compile(Main.java:538)
              at com.sun.tools.javac.Main.compile(Main.java:44)
              at com.sun.tools.javac.Main.main(Main.java:35)

      How to reproduce:-
      Copy the attached java files in any directory.
      Try to compile them by issuing a command *.java
      one can see the crash.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gafter Neal Gafter
              Reporter:
              jsinghsunw Jit Singh (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: