JDK-8037379 : fix for JDK-8029569 doesn't cover all possible cases
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2014-03-14
  • Updated: 2014-07-29
  • Resolved: 2014-05-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b14Fixed
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
$ java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Linux antoine-envy4 3.8.0-37-generic #53~precise1-Ubuntu SMP Wed Feb 19 21:37:54 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
I'm using Gradle 1.11

A DESCRIPTION OF THE PROBLEM :
javac throws a java.lang.ClassCastException during compilation, here is the complete stacktrace :

An exception has occurred in the compiler (1.8.0). 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.ClassCastException: com.sun.tools.javac.comp.Resolve$BadVarargsMethod cannot be cast to com.sun.tools.javac.comp.Resolve$InapplicableSymbolsError
	at com.sun.tools.javac.comp.Resolve.canIgnore(Resolve.java:2977)
	at com.sun.tools.javac.comp.Resolve.choose(Resolve.java:2953)
	at com.sun.tools.javac.comp.Resolve.resolveMemberReference(Resolve.java:2887)
	at com.sun.tools.javac.comp.Attr.visitReference(Attr.java:2722)
	at com.sun.tools.javac.tree.JCTree$JCMemberReference.accept(JCTree.java:1967)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596)
	at com.sun.tools.javac.comp.Attr.visitReturn(Attr.java:1689)
	at com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1378)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665)
	at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:681)
	at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1127)
	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:903)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665)
	at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1020)
	at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:772)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665)
	at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4305)
	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4215)
	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4149)
	at com.sun.tools.javac.comp.Attr.visitClassDef(Attr.java:877)
	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:687)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665)
	at com.sun.tools.javac.comp.Attr.visitNewClass(Attr.java:2142)
	at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1510)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596)
	at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:638)
	at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:1078)
	at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:846)
	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596)
	at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665)
	at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4305)
	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4215)
	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4149)
	at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4124)
	at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1251)
	at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:904)
	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:863)
	at com.sun.tools.javac.main.Main.compile(Main.java:523)
	at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
	at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)


REGRESSION.  Last worked in version 8

ADDITIONAL REGRESSION INFORMATION: 
It works on a Windows JDK 1.8.0 b129

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I don't know how to reproduce this bug since javac doesn't give much information about it. I could have given you exactly the line where javac fails if you tell me how to make javac tell me.


REPRODUCIBILITY :
This bug can be reproduced always.


Comments
ManualVerify: Bug verified manually in promoted results for build JDK9-b14
08-07-2014

The fix for JDK-8029569 was incomplete and this bug is proving that.
01-05-2014

I have sent a mail to the user to gather more information, like a test case, to reproduce this issue.
16-04-2014

Release team: Approved for deferral. Deferring this to 8u20 since 9 is too far out (unless this is a fix that can only be done in a major release, if so please move it to 9)
21-03-2014