Description
FULL PRODUCT VERSION :
javac 1.7.0_15
ADDITIONAL OS VERSION INFORMATION :
Linux lindan 3.5.0-25-generic #39-Ubuntu SMP Mon Feb 25 18:26:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Given code leads to java.lang.AssertionError
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile given source code example with a jdk 7 javac.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compiles cleanly as in JDK 6.
ACTUAL -
An exception has occurred in the compiler (1.7.0_15). 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.AssertionError: <anonymous >
at com.sun.tools.javac.util.Assert.error(Assert.java:133)
at com.sun.tools.javac.util.Assert.check(Assert.java:86)
at com.sun.tools.javac.comp.Attr.attribBounds(Attr.java:561)
at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:716)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:669)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:480)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:3241)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3164)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3100)
at com.sun.tools.javac.comp.Attr.attrib(Attr.java:3074)
at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1184)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:870)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:829)
at com.sun.tools.javac.main.Main.compile(Main.java:439)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:342)
at com.sun.tools.javac.main.Main.compile(Main.java:333)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
An exception has occurred in the compiler (1.7.0_15). 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.AssertionError: <anonymous >
at com.sun.tools.javac.util.Assert.error(Assert.java:133)
at com.sun.tools.javac.util.Assert.check(Assert.java:86)
at com.sun.tools.javac.comp.Attr.attribBounds(Attr.java:561)
at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:716)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:669)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:480)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:3241)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3164)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3100)
at com.sun.tools.javac.comp.Attr.attrib(Attr.java:3074)
at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1184)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:870)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:829)
at com.sun.tools.javac.main.Main.compile(Main.java:439)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:342)
at com.sun.tools.javac.main.Main.compile(Main.java:333)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
interface SomeInterface {}
enum SomeEnumImplementation implements SomeInterface {}
public enum SomeEnum {
VALUE( SomeEnumImplementation.class ) {
public Object doSomething() {
return null;
}
};
private <C extends Enum<?> & SomeInterface> SomeEnum(
final Class<C> aClass ) {
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None known
javac 1.7.0_15
ADDITIONAL OS VERSION INFORMATION :
Linux lindan 3.5.0-25-generic #39-Ubuntu SMP Mon Feb 25 18:26:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Given code leads to java.lang.AssertionError
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile given source code example with a jdk 7 javac.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compiles cleanly as in JDK 6.
ACTUAL -
An exception has occurred in the compiler (1.7.0_15). 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.AssertionError: <anonymous >
at com.sun.tools.javac.util.Assert.error(Assert.java:133)
at com.sun.tools.javac.util.Assert.check(Assert.java:86)
at com.sun.tools.javac.comp.Attr.attribBounds(Attr.java:561)
at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:716)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:669)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:480)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:3241)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3164)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3100)
at com.sun.tools.javac.comp.Attr.attrib(Attr.java:3074)
at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1184)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:870)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:829)
at com.sun.tools.javac.main.Main.compile(Main.java:439)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:342)
at com.sun.tools.javac.main.Main.compile(Main.java:333)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
An exception has occurred in the compiler (1.7.0_15). 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.AssertionError: <anonymous >
at com.sun.tools.javac.util.Assert.error(Assert.java:133)
at com.sun.tools.javac.util.Assert.check(Assert.java:86)
at com.sun.tools.javac.comp.Attr.attribBounds(Attr.java:561)
at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:716)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:669)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:480)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:3241)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3164)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3100)
at com.sun.tools.javac.comp.Attr.attrib(Attr.java:3074)
at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1184)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:870)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:829)
at com.sun.tools.javac.main.Main.compile(Main.java:439)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:342)
at com.sun.tools.javac.main.Main.compile(Main.java:333)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
interface SomeInterface {}
enum SomeEnumImplementation implements SomeInterface {}
public enum SomeEnum {
VALUE( SomeEnumImplementation.class ) {
public Object doSomething() {
return null;
}
};
private <C extends Enum<?> & SomeInterface> SomeEnum(
final Class<C> aClass ) {
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None known