JDK-8203462 : Compiler crashes with NPE when generic types used
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8u171
  • Priority: P4
  • Status: Closed
  • Resolution: Incomplete
  • OS: windows_10
  • CPU: x86_64
  • Submitted: 2018-05-17
  • Updated: 2018-06-04
  • Resolved: 2018-06-04
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
NPE occurs when internal class extends a generic parameter.

Stacktrace:
java.lang.NullPointerException
        at com.sun.tools.javac.code.Types.getBounds(Types.java:2538)
        at com.sun.tools.javac.comp.Check.checkNonCyclic1(Check.java:2195)
        at com.sun.tools.javac.comp.Check.checkNonCyclic1(Check.java:2196)
        at com.sun.tools.javac.comp.Check.checkNonCyclic(Check.java:2181)
        at com.sun.tools.javac.comp.Attr.attribTypeVariables(Attr.java:713)
        at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:1117)
        at com.sun.tools.javac.code.Symbol.complete(Symbol.java:574)
        at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1037)
        at com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:973)
        at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:369)
        at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:365)
        at com.sun.tools.javac.comp.Resolve.findImmediateMemberType(Resolve.java:1923)
        at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:1978)
        at com.sun.tools.javac.comp.Resolve.findIdentInType(Resolve.java:2162)
        at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:3388)
        at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3254)
        at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1897)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566)
        at com.sun.tools.javac.comp.Attr.attribType(Attr.java:628)
        at com.sun.tools.javac.comp.Attr.attribType(Attr.java:621)
        at com.sun.tools.javac.comp.Attr.visitTypeApply(Attr.java:3887)
        at com.sun.tools.javac.tree.JCTree$JCTypeApply.accept(JCTree.java:2135)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566)
        at com.sun.tools.javac.comp.Attr.attribType(Attr.java:628)
        at com.sun.tools.javac.comp.Attr.attribType(Attr.java:621)
        at com.sun.tools.javac.comp.Attr.attribAnyTypes(Attr.java:677)
        at com.sun.tools.javac.comp.Attr.attribTypes(Attr.java:685)
        at com.sun.tools.javac.comp.Attr.visitTypeApply(Attr.java:3890)
        at com.sun.tools.javac.tree.JCTree$JCTypeApply.accept(JCTree.java:2135)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566)
        at com.sun.tools.javac.comp.Attr.attribType(Attr.java:628)
        at com.sun.tools.javac.comp.Attr.attribType(Attr.java:621)
        at com.sun.tools.javac.comp.Attr.attribBase(Attr.java:776)
        at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:1057)
        at com.sun.tools.javac.code.Symbol.complete(Symbol.java:574)
        at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1037)
        at com.sun.tools.javac.comp.Enter.complete(Enter.java:493)
        at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
        at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
        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)


FREQUENCY : always



Comments
The bug could not be reproduced. The bug can be reopened if there is a reproducible testcase or clear reproducible steps
04-06-2018

Stack traces looks very similar to JDK-6660289 which has already fixed in 7. Requestting submitter to clerify on the Java version being used and provide stand alone test case
18-05-2018