java.lang.AssertionError: isSubClass C

JDK Bug System | Webbug Group | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    FULL PRODUCT VERSION : A DESCRIPTION OF THE PROBLEM : Compiling the two attached trivial classes leads to the following compiler-failure: An exception has occurred in the compiler (1.8.0_91). 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: isSubClass C at com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:447) at com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:456) Reproduced with the java-versions 1.8.0_102, 1.8.0_101, 1.8.0_91, 1.8.0_66. A (mysterious) role plays the method "public boolean close(long timeout)" in the class B: if it doesn't exist, the error doesn't occur. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Compile the attached two classes with javac on the command-line (eg. javac *.java). ERROR MESSAGES/STACK TRACES THAT OCCUR : An exception has occurred in the compiler (1.8.0_91). 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: isSubClass C at com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:447) at com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:456) at com.sun.tools.javac.code.Symbol$MethodSymbol.overrides(Symbol.java:1479) at com.sun.tools.javac.code.Types$ImplementationCache.implementationInternal(Types.java:2693) at com.sun.tools.javac.code.Types$ImplementationCache.get(Types.java:2675) at com.sun.tools.javac.code.Types.implementation(Types.java:2704) at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1539) at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1528) at com.sun.tools.javac.comp.Resolve.notOverriddenIn(Resolve.java:419) at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:405) at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:365) at com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1457) at com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1627) at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1719) at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1671) at com.sun.tools.javac.comp.Resolve$9.doLookup(Resolve.java:2424) at com.sun.tools.javac.comp.Resolve$BasicLookupHelper.lookup(Resolve.java:3083) at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3334) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2421) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2415) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2410) at com.sun.tools.javac.comp.Attr.checkAutoCloseable(Attr.java:1389) at com.sun.tools.javac.comp.Attr.visitTry(Attr.java:1335) at com.sun.tools.javac.tree.JCTree$JCTry.accept(JCTree.java:1173) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:651) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1114) at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635) at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1003) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635) at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4340) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4248) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4177) at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4152) at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248) at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860) at com.sun.tools.javac.main.Main.compile(Main.java:523) at com.sun.tools.javac.main.Main.compile(Main.java:381) at com.sun.tools.javac.main.Main.compile(Main.java:370) at com.sun.tools.javac.main.Main.compile(Main.java:361) at com.sun.tools.javac.Main.compile(Main.java:56) at com.sun.tools.javac.Main.main(Main.java:42) REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- abstract class B implements AutoCloseable { @Override public void close() { } public boolean close(long timeout) { return true; } } public abstract class A<C extends B> { abstract C newCloseable(); void m() throws Exception{ try(C p= newCloseable()){ } } } ---------- END SOURCE ----------

    JDK Bug System | 7 months ago | Webbug Group
    java.lang.AssertionError: isSubClass C
  2. 0

    is this a javac bug or some error in my code

    Stack Overflow | 6 years ago | Charbel
    java.lang.AssertionError: {rawtypes}
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    [JDK-8129589] Javac fails with assertion error when lambda types are not specified - Java Bug System

    java.net | 1 year ago
    java.lang.AssertionError: attribution shouldn't be happening here
  5. 0

    Bug ID: JDK-8056984 Exception in compiler: java.lang.AssertionError: isSubClass T

    java.com | 5 months ago
    java.lang.AssertionError: isSubClass T

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.AssertionError

      isSubClass C

      at com.sun.tools.javac.code.Symbol.isSubClass()
    2. Java Tools
      Main.main
      1. com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:447)
      2. com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:456)
      3. com.sun.tools.javac.code.Symbol$MethodSymbol.overrides(Symbol.java:1479)
      4. com.sun.tools.javac.code.Types$ImplementationCache.implementationInternal(Types.java:2693)
      5. com.sun.tools.javac.code.Types$ImplementationCache.get(Types.java:2675)
      6. com.sun.tools.javac.code.Types.implementation(Types.java:2704)
      7. com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1539)
      8. com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1528)
      9. com.sun.tools.javac.comp.Resolve.notOverriddenIn(Resolve.java:419)
      10. com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:405)
      11. com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:365)
      12. com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1457)
      13. com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1627)
      14. com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1719)
      15. com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1671)
      16. com.sun.tools.javac.comp.Resolve$9.doLookup(Resolve.java:2424)
      17. com.sun.tools.javac.comp.Resolve$BasicLookupHelper.lookup(Resolve.java:3083)
      18. com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3334)
      19. com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2421)
      20. com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2415)
      21. com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2410)
      22. com.sun.tools.javac.comp.Attr.checkAutoCloseable(Attr.java:1389)
      23. com.sun.tools.javac.comp.Attr.visitTry(Attr.java:1335)
      24. com.sun.tools.javac.tree.JCTree$JCTry.accept(JCTree.java:1173)
      25. com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566)
      26. com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635)
      27. com.sun.tools.javac.comp.Attr.attribStats(Attr.java:651)
      28. com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1114)
      29. com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909)
      30. com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566)
      31. com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635)
      32. com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1003)
      33. com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
      34. com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566)
      35. com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635)
      36. com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4340)
      37. com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4248)
      38. com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4177)
      39. com.sun.tools.javac.comp.Attr.attrib(Attr.java:4152)
      40. com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248)
      41. com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
      42. com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
      43. com.sun.tools.javac.main.Main.compile(Main.java:523)
      44. com.sun.tools.javac.main.Main.compile(Main.java:381)
      45. com.sun.tools.javac.main.Main.compile(Main.java:370)
      46. com.sun.tools.javac.main.Main.compile(Main.java:361)
      47. com.sun.tools.javac.Main.compile(Main.java:56)
      48. com.sun.tools.javac.Main.main(Main.java:42)
      48 frames