Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6213818

crash: java.lang.NullPointerException at com.sun.tools.javac.code.Types$SubstFcn.subst(Types.java:20

    Details

    • Subcomponent:
    • Resolved In Build:
      b67
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0-ea"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b16)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b16, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      compiler crash instead of sensible message,

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      see below under "Source-Code"

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      compiler crash instead of sensible message
      ACTUAL -
      see "Error Messages"

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      C:\Daten\arbeit6\g2_repro>C:\Programme\java\jdk1.6.0\bin\javac -sourcepath src -d bin -Xlint:unchecked src\BasicNode.java
      An exception has occurred in the compiler (1.6.0-ea). 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.NullPointerException
              at com.sun.tools.javac.code.Types$SubstFcn.subst(Types.java:2057)
              at com.sun.tools.javac.code.Types.subst(Types.java:2046)
              at com.sun.tools.javac.code.Types.substBound(Types.java:2195)
              at com.sun.tools.javac.comp.Check$Validator.visitTypeApply(Check.java:764)
              at com.sun.tools.javac.tree.Tree$TypeApply.accept(Tree.java:1064)
              at com.sun.tools.javac.comp.Check.validate(Check.java:719)
              at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:2430)
              at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2406)
              at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2355)
              at com.sun.tools.javac.comp.Attr.attribTypeParams(Attr.java:363)
              at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:845)
              at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
              at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:614)
              at com.sun.tools.javac.comp.Enter.complete(Enter.java:448)
              at com.sun.tools.javac.main.JavaCompiler.complete(JavaCompiler.java:381)
              at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1574)
              at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1518)
              at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
              at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:614)
              at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1618)
              at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:808)
              at com.sun.tools.javac.comp.Resolve.findGlobalType(Resolve.java:867)
              at com.sun.tools.javac.comp.Resolve.findType(Resolve.java:923)
              at com.sun.tools.javac.comp.Resolve.findIdent(Resolve.java:952)
              at com.sun.tools.javac.comp.Resolve.resolveIdent(Resolve.java:1128)
              at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:1587)
              at com.sun.tools.javac.tree.Tree$Ident.accept(Tree.java:1009)
              at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:280)
              at com.sun.tools.javac.comp.Attr.attribType(Attr.java:308)
              at com.sun.tools.javac.comp.Attr.visitTypeApply(Attr.java:2209)
              at com.sun.tools.javac.tree.Tree$TypeApply.accept(Tree.java:1064)
              at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:280)
              at com.sun.tools.javac.comp.Attr.attribType(Attr.java:308)
              at com.sun.tools.javac.comp.Attr.attribBase(Attr.java:381)
              at com.sun.tools.javac.comp.Attr.visitTypeParameter(Attr.java:2262)
              at com.sun.tools.javac.tree.Tree$TypeParameter.accept(Tree.java:1080)
              at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:280)
              at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:315)
              at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:331)
              at com.sun.tools.javac.comp.Attr.attribTypeParams(Attr.java:356)
              at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:845)
              at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
              at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:614)
              at com.sun.tools.javac.comp.Enter.complete(Enter.java:448)
              at com.sun.tools.javac.comp.Enter.main(Enter.java:426)
              at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:413)
              at com.sun.tools.javac.main.Main.compile(Main.java:592)
              at com.sun.tools.javac.main.Main.compile(Main.java:544)
              at com.sun.tools.javac.Main.compile(Main.java:67)
              at com.sun.tools.javac.Main.main(Main.java:52)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      The following 4 classes in corresponding files:

      public interface Edge<N extends Node<? extends Edge<N>>> { }

      public interface Node<E extends Edge<? extends Node<E>>> { }

      class BasicNode<E extends BasicEdge<N, E> & Edge<N>, N extends BasicNode<E, N> & Node<E>> implements Node<E> { }

      class BasicEdge<N extends BasicNode<E, N> & Node<E>, E extends BasicEdge<N, E> & Edge<N>> implements Edge<N> { }

      compile these classes with:
      set JAVA_HOME=C:\Programme\java\jdk1.6.0
      set JAVA_COMPILE=%JAVA_HOME%\bin\javac -sourcepath src -d bin -Xlint:unchecked
      %JAVA_HOME%\bin\java -version
      %JAVA_COMPILE% src\Edge.java
      %JAVA_COMPILE% src\Node.java
      %JAVA_COMPILE% src\BasicNode.java
      pause


      ---------- END SOURCE ----------
      ###@###.### 2005-1-04 17:48:36 GMT

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ahe Peter Ahe
                Reporter:
                rmandalasunw Ranjith Mandala (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: