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

ClassCastException in Code.emitInvokespecial (boxing vs ?: vs array literals)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description



      Name: dmR10075 Date: 12/03/2003


      During the build of j2se workspace, in make/sun/xawt directory, the
      following error was reported by javac:
      -------------------------------------
      An exception has occurred in the compiler (1.5.0-internal). 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.ClassCastException: com.sun.tools.javac.code.Type$ArrayType
              at com.sun.tools.javac.jvm.Code.emitInvokespecial(Code.java:378)
              at
      com.sun.tools.javac.jvm.Items$MemberItem.invoke(Items.java:479)
              at com.sun.tools.javac.jvm.Gen.visitNewClass(Gen.java:1691)
              at com.sun.tools.javac.tree.Tree$NewClass.accept(Tree.java:832)
              at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:801)
              at com.sun.tools.javac.jvm.Gen.visitVarDef(Gen.java:954)
              at com.sun.tools.javac.tree.Tree$VarDef.accept(Tree.java:502)
              at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:648)
              at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:683)
              at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:669)
              at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:720)
              at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:967)
              at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:531)
              at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:648)
              at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:683)
              at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:669)
              at com.sun.tools.javac.jvm.Gen.genTry(Gen.java:1339)
              at com.sun.tools.javac.jvm.Gen.visitSynchronized(Gen.java:1285)
              at
      com.sun.tools.javac.tree.Tree$Synchronized.accept(Tree.java:649)
              at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:648)
              at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:683)
              at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:669)
              at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:720)
              at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:967)
              at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:531)
              at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:648)
              at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:683)
              at com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:905)
              at com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:841)
              at com.sun.tools.javac.tree.Tree$MethodDef.accept(Tree.java:473)
              at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:648)
              at com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2167)
              at
      com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:328)
              at
      com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:467)
              at com.sun.tools.javac.main.Main.compile(Main.java:598)
              at com.sun.tools.javac.main.Main.compile(Main.java:546)
              at com.sun.tools.javac.Main.compile(Main.java:41)
              at com.sun.tools.javac.Main.main(Main.java:32)
      gmake[1]: *** [.compile.classlist] Error 4
      gmake[1]: Leaving directory `/export1/dom/xembed_server/make/sun/xawt'
      gmake: *** [optimized] Error 2
      Command exited with non-zero status 2
      real 10.75
      user 7.05
      sys 0.67
      -------------------
      The problem manifested after I added another java file to sun/awt/X11
      directory. Removing the file eliminates the problem. Since I am unable
      to attach or paste this file please send me a request and I'll send the
      file to you.

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: