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

having class MyEnum$1 and enum MyEnum{ A{}, ... }, compiler fails...

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 8u20, 9
    • tools
    • x86_64
    • windows_7

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      Windows 7

      A DESCRIPTION OF THE PROBLEM :
      declare the following
       class MyEnum$1 {}, and
       enum MyEnum{
         A{}, B{}, C{}
      }
      in the same source file / package.
      Starting the compiler have an error.





      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Information:Using javac 1.8.0_20 to compile java sources
      Information:java: An exception has occurred in the compiler (1.8.0_20). 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.
      Information:java: java.lang.NullPointerException
      Information:java: at com.sun.tools.javac.comp.Lower.makeEmptyClass(Lower.java:658)
      Information:java: at com.sun.tools.javac.comp.Lower.checkAccessConstructorTags(Lower.java:786)
      Information:java: at com.sun.tools.javac.comp.Lower.translateTopLevelClass(Lower.java:3938)
      Information:java: at com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1512)
      Information:java: at com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1356)
      Information:java: at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
      Information:java: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
      Information:java: at com.sun.tools.javac.main.Main.compile(Main.java:523)
      Information:java: at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
      Information:java: at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
      Information:java: at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:165)
      Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:407)
      Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:304)
      Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:210)
      Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:182)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1106)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:814)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:862)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:777)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:600)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:352)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:184)
      Information:java: at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)
      Information:java: at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:224)
      Information:java: at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)
      Information:java: at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:157)
      Information:java: at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
      Information:java: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      Information:java: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      Information:java: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      Information:java: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      Information:java: at java.lang.Thread.run(Thread.java:745)
      Information:java: Errors occurred while compiling module 'EnumTests'
      Information:Module "EnumTests" was fully rebuilt due to project configuration/dependencies changes
      Information:Compilation completed with 1 error and 0 warnings in 2 sec
      Information:1 error
      Information:0 warnings
      Error:java: Compilation failed: internal java compiler error

      REPRODUCIBILITY :
      This bug can be reproduced always.

            jlahoda Jan Lahoda
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: