FULL PRODUCT VERSION :
java version "10-ea"
Java(TM) SE Runtime Environment (build 10-ea+35)
Java HotSpot(TM) 64-Bit Server VM (build 10-ea+35, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
javac compile this java file:
import javax.annotation.*;
public class test
{
@Generated(value={ "test" })
public static void main(String[] args)
{
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
use javac to compile a program. Will compile on jdk-8, but not on jdk-9 or jdk-10
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
no crash on compile
ACTUAL -
crash on compile
ERROR MESSAGES/STACK TRACES THAT OCCUR :
An exception has occurred in the compiler (10-ea). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. include your program and the following diagnostic in your report. Thank you.
java.lang.AssertionError: typeSig ERROR
at jdk.compiler/com.sun.tools.javac.code.Types$SignatureGenerator.assembleSig(Types.java:5165)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter$CWSignatureGenerator.assembleSig(ClassWriter.java:291)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.typeSig(ClassWriter.java:334)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.writeCompoundAttribute(ClassWriter.java:858)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.writeJavaAnnotations(ClassWriter.java:726)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.writeMemberAttrs(ClassWriter.java:593)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.writeMethod(ClassWriter.java:1182)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.writeMethods(ClassWriter.java:1653)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.writeClassFile(ClassWriter.java:1761)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1679)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:749)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1627)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1595)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:965)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:306)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:165)
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.annotation.*;
public class test
{
@Generated(value={ "test" })
public static void main(String[] args)
{
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Do not use @Generated(value={ "test" })